سنتر العرب
 

ماشاء الله تبارك الله ماشاء الله لاقوة الا بالله , اللهم اني اسالك الهدى والتقى والعفاف والغنى

   

 

 

    تويتر فيس بوك

 

Loading


العودة   منتديات سنتر العرب > سنتر العرب - الاقسام العامة > سنتر العرب - الأنترنت والكمبيوتر و الـ DSL > سنتر العرب لخدمات الويب > لغات البرمجه, php , asp,Ajax, visual basic Java

لغات البرمجه, php , asp,Ajax, visual basic Java لغات البرمجه, php , asp,Ajax, visual basic Java,لغات البرمجه, php , asp,Ajax, visual basic Java,لغات البرمجه, php , asp,Ajax, visual basic Java,لغات البرمجه, php , asp,Ajax, visual basic Java,


كود تشغيل البرنامج بمجرد تشغيل الويندوز

لغات البرمجه, php , asp,Ajax, visual basic Java


إضافة رد
 
أدوات الموضوع
قديم 07-12-2010, 11:35 AM   رقم المشاركة : [1]
عنـ الشوق ـاد
,

 الصورة الرمزية عنـ الشوق ـاد
 





عنـ الشوق ـاد is a splendid one to behold عنـ الشوق ـاد is a splendid one to behold عنـ الشوق ـاد is a splendid one to behold عنـ الشوق ـاد is a splendid one to behold عنـ الشوق ـاد is a splendid one to behold عنـ الشوق ـاد is a splendid one to behold عنـ الشوق ـاد is a splendid one to behold عنـ الشوق ـاد is a splendid one to behold

 
افتراضي كود تشغيل البرنامج بمجرد تشغيل الويندوز

تعتمد هذه الدالة على كتابة اسم البرنامج في الريجستري الخاص بالويندوز عن طريق الدالة RegSetValueEx ، وذلك في واحد من المسارات التي تستخدم لكتابة برامج بدء التشغيل مثل المكان التالي
\Software\Microsoft\Windows\Currentversion\run
والموجود في HKEY_LOCAL_MACHINE .

والباقي أوامر مخصصة للتعامع مع مكتبات الريجستري .


اقتباس:
Public Declare Function RegOpenKeyEx _
Lib "advapi32.dll" Alias "RegOpenKeyExA" _
(ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long
Public Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Public Declare Function RegCreateKeyEx Lib "advapi32.dll" Alias "RegCreateKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal Reserved As Long, ByVal lpClass As String, ByVal dwOptions As Long, ByVal samDesired As Long, lpSecurityAttributes As SECURITY_ATTRIBUTES, phkResult As Long, lpdwDisposition As Long) As Long
Public Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long ' Note that if you declare the lpData parameter as String, you must pass it By Value.
Public Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long ' Note that if you declare the lpData parameter as String, you must pass it By Value.
Public Type SECURITY_ATTRIBUTES
nLength As Long
lpSecurityDescriptor As Long
bInheritHandle As Long
End Type
Public Const REG_SZ = 1
Public Const KEY_WRITE = &H20006
Public Const KEY_READ = &H20019
Public Const HKEY_LOCAL_MACHINE = &H800000

اقتباس:
Dim hregkey As Long
Dim secattr As SECURITY_ATTRIBUTES
Dim neworused As Long
Dim stringbuffer As String
Dim slength As Long
Dim retval As Long
Dim subkey
subkey = "\Software\Microsoft\Windows\Currentversion\run"
secattr.nLength = Len(secattr)
secattr.lpSecurityDescriptor = 0
secattr.bInheritHandle = True
retval = RegCreateKeyEx(HKEY_LOCAL_MACHINE, subkey, 0, "", 0, KEY_WRITE, secattr, hregkey, neworused)
If retval <> 0 Then
Debug.Print "Error opening or creating registry key ---aborting"
End
End If
stringbuffer = App.Path & "\" & App.EXEName & ".exe" & vbNullChar
retval = RegSetValueEx(hregkey, Trim(App.Title), 0, REG_SZ, ByVal stringbuffer, Len(stringbuffer))
retval = RegCloseKey(hregkey)

توقيع عنـ الشوق ـاد
عنـ الشوق ـاد غير متواجد حالياً   رد مع اقتباس
إضافة رد

مواقع النشر (المفضلة)

الكلمات الدلالية (Tags)
تشغيل البرنامج بمجرد تشغيل الويندوز


الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1)
 
أدوات الموضوع

تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML متاحة

الانتقال السريع

  Bookmark and Share

  


الساعة الآن 10:47 AM

|

www.swsws.net® Version 3.8.6
Copyright ©2000 - 2012, 7: swsws Ltd.
تنبية جميع ما يتم كتابته في المنتدى يعبر عن رأي كاتبه فقط ولا تتحمل إدارة منتديات سنتر العرب أدنى مسؤولية

Security team