-
August 2nd, 2013, 12:52 PM
#1
add .reg file inside VB6
I want to add a .reg file into Registry by inside VB6 , I don't want :
Shell ("regedit /s C:\xxx.reg)
As sometimes it works in Win8 by not in Win7 , or vise versa. The .reg file is a bit long , so I don't know how to write them in VB6 :
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList]
"Default"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,44,00,72,00,69,00,\
76,00,65,00,25,00,5c,00,55,00,73,00,65,00,72,00,5c,00,44,00,65,00,66,00,61,\
00,75,00,6c,00,74,00,00,00
"ProfilesDirectory"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,44,00,72,\
00,69,00,76,00,65,00,25,00,5c,00,55,00,73,00,65,00,72,00,00,00
"Public"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,44,00,72,00,69,00,76,\
00,65,00,25,00,5c,00,55,00,73,00,65,00,72,00,5c,00,50,00,75,00,62,00,6c,00,\.
69,00,63,00,00,00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-3696591734-2486099824-1420648632-1001]
"ProfileImagePath"=hex(2):43,00,3a,00,5c,00,55,00,73,00,65,00,72,00,5c,00,50,\
00,43,00,00,00
Please help. Thanks
-
August 2nd, 2013, 03:29 PM
#2
Re: add .reg file inside VB6
Explain WHAT you are trying to do.
-
August 3rd, 2013, 11:39 AM
#3
Re: add .reg file inside VB6
This is just an example , as some .reg file is quite long and in different location like above.
Instead of generate a .reg file and and use
Shell ("regedit /s C:\xxx.reg)
I want to run the contents of the xxx.reg from inside VB6 like :
CreateObject("WScript.Shell").RegWrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\CleanRubbish", "Clean.exe"
If the xxx.reg is very long , how can I do it like above in VB6
-
August 4th, 2013, 09:18 AM
#4
Re: add .reg file inside VB6
You could use a variable instead of putting the literal text on that line.
Of course I would not use the Wscript object at all but it should do,
Always use [code][/code] tags when posting code.
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
|