|
-
Nov 19th, 2000, 02:09 PM
#1
Thread Starter
Member
hey why does this function doesn't work with win2k ?
i use: SaveString HKEY_CURRENT_USER, "\Software\Microsoft\Windows\CurrentVersion\Run", "Carnet", "1" 'SlacheCheck(App.Path) & "\" & App.EXEName & ".exe -autocheck"
__________________________________________________
Public Const HKEY_CURRENT_USER = &H80000001
Public Const REG_SZ = 1
Public Sub SaveString(hKey As Long, strPath As String, strValue As String, strdata As String)
Dim keyhand As Long
Dim r As Long
r = RegCreateKey(hKey, strPath, keyhand)
r = RegSetValueEx(keyhand, strValue, 0, REG_SZ, ByVal strdata, Len(strdata))
r = RegCloseKey(keyhand)
End Sub
-
Nov 19th, 2000, 02:57 PM
#2
Hyperactive Member
Do you have admin rights?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|