|
-
Apr 30th, 2000, 01:21 AM
#1
Thread Starter
Junior Member
o.k this is my question i need to edit the Registery, changeing the Default Value to something else BUT the probleme is that the Default Key :HKEY_CLASSES_ROOT\txtfile\shell\open\command: (Default) : C:\WINDOWS\NOTEPAD.EXE %1
i have this
but i have to replace with this : (Default) : C:\Path\Myprog.exe %1
but i'v tryed with API 's but it creat a seconed String named (Default), so no there a :
(Default) : C:\WINDOWS\NOTEPAD.EXE %1
(Default) : C:\Path\Myprog.exe %1
in my registery
this is what i have, how would i change the Default string ? :
Private Sub Command1_Click()
savekey HKEY_CLASSES_ROOT, "txtfile\shell\open\command", "(Default)", Text1.Text
End Sub
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
[Edited by Zulander1 on 04-30-2000 at 02:23 PM]
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
|