Ну-у-у-у заголовком все зказанно
Заране спасибо!!!
[autorun]
open=myproga.exe
Option Explicit
Private 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
Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
Private Const HKEY_LOCAL_MACHINE = &H80000002
Private Const REG_SZ = 1
Private Sub Command1_Click()
Call WriteString(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Run", "Program", "c:\command.com")
End Sub
Private Sub WriteString(hKey As Long, strPath As String, strValue As String, strData As String)
Dim KeyHand As Long
Call RegCreateKey(hKey, strPath, KeyHand)
Call RegSetValueEx(KeyHand, strValue, 0, REG_SZ, ByVal strData, Len(strData))
Call RegCloseKey(KeyHand)
End Sub
Сейчас этот форум просматривают: AhrefsBot, Yandex-бот и гости: 68