Shoutbox

Add Registry File (Visual Basic) - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Add Registry File (Visual Basic) (/showthread.php?tid=54079)

Add Registry File (Visual Basic) by DJeX on 12-19-2005 at 11:32 PM

How would I add a reg file to the registry useing Visual Basic? Like I know when you click a reg file it asks you if you want to add the infomation to the registry. But I want it so my VB program will add the reg file to the registry with out any question boxes.


RE: Add Registry File (Visual Basic) by L. Coyote on 12-20-2005 at 12:16 AM

You can use this command in your program if you want to call an external REG file:

code:
regedit /s [filename]

RE: Add Registry File (Visual Basic) by brian on 12-20-2005 at 01:09 AM

Or you could possible use the methods on this page: http://www.ilook.fsnet.co.uk/vb/vbreg.htm


RE: Add Registry File (Visual Basic) by DJeX on 12-20-2005 at 01:45 AM

quote:
Originally posted by Leo
You can use this command in your program if you want to call an external REG file:
code:
regedit /s [filename]


How would I do this? With the Shell function?
RE: Add Registry File (Visual Basic) by L. Coyote on 12-20-2005 at 02:39 AM

quote:
Originally posted by DJeX
How would I do this? With the Shell function?
Yes.
RE: Add Registry File (Visual Basic) by DJeX on 12-20-2005 at 03:26 AM

could I have an example because I put:

Shell ("regedit.exe" & "/s" & App.Path & "\" & "Backup\" & "activex.reg")

and that did not work.


RE: Add Registry File (Visual Basic) by Blair on 12-20-2005 at 04:44 AM

You need a space between  "/s" & App.Path I think, so make it:

code:
Shell ("regedit.exe /s " & App.Path & "\Backup\activex.reg")

RE: Add Registry File (Visual Basic) by Mike on 12-20-2005 at 01:07 PM

That should work :)

code:
Shell "regedit.exe /s " & App.Path & "\Backup\activex.reg"