|
-
Nov 7th, 2001, 08:19 AM
#1
Thread Starter
Hyperactive Member
Merge a .reg File
Is there a way for a program to merge a .reg file (Regedit 4) without asking the user for confirmation?
Thanks
-
Nov 7th, 2001, 08:21 AM
#2
Conquistador
Open it using your VB prog, then transfer it into the registry?
-
Nov 7th, 2001, 08:22 AM
#3
Member
VB Code:
Shell "regedit.exe somefile.reg /s". vbNormalFocus
-
Nov 7th, 2001, 08:23 AM
#4
Conquistador
Well done dilbert, woops i mean ariel...
-
Nov 7th, 2001, 10:09 AM
#5
Thread Starter
Hyperactive Member
-
Nov 8th, 2001, 11:48 AM
#6
Thread Starter
Hyperactive Member
To filburt1
That works but it still asks for confirmation.
-
Nov 8th, 2001, 03:45 PM
#7
Conquistador
-
Nov 8th, 2001, 04:09 PM
#8
Member
Re: To filburt1
Originally posted by jdc6029
That works but it still asks for confirmation.
Weird, try this then:
VB Code:
Shell "regedit.exe /s somefile.reg". vbNormalFocus
PassProg does this, just a sec while I check the code...
-
Nov 8th, 2001, 04:11 PM
#9
Member
Here's the code that does what I need with a .reg file...
VB Code:
Sub HideExtraButtonsOnFirstRun()
Dim WindowsCommand As String, SystemCommand As String
WindowsCommand = GetOSDirectory(WindowsDirectory) & "\regedit.exe"
SystemCommand = GetOSDirectory(SystemDirectory) & "\regedit.exe"
If Dir(WindowsCommand) <> "" Then
AppStr WindowsCommand, " /s " & Chr(34) & App.Path & "\Default Toolbar Setup.reg" & Chr(34)
Shell WindowsCommand, vbMinimizedNoFocus
Exit Sub
Else
If Dir(SystemCommand) <> "" Then
AppStr WindowsCommand, " /s " & Chr(34) & App.Path & "\Default Toolbar Setup.reg" & Chr(34)
Shell SystemCommand, vbMinimizedNoFocus
Exit Sub
Else
MsgBox "Unable to apply toolbar registry patch: to remove extra buttons from the toolbar, " _
& "right-click the toolbar and select Customize.", vbExclamation, "Error"
End If
End If
End Sub
-
Nov 8th, 2001, 04:14 PM
#10
Member
After reading that code it looks like Shell "regedit.exe /s somefile.reg". vbNormalFocus will work.
-
Nov 9th, 2001, 06:47 AM
#11
Thread Starter
Hyperactive Member
Thanks
Shell "regedit.exe /s somefile.reg", vbNormalFocus
does work great. Now I just have to make it work with my ShellExecute function so it will work on Win2k also since the Shell command won't work with it, Thanks.
The 'HideExtraButtonsOnFirstRun' is a good sub, thanks also.
To da_silvy
The reason I don't want to use a merge reg function is because my .reg file has over 100 entries and this will save me a lot of coding.
-
Nov 9th, 2001, 06:49 AM
#12
Conquistador
It wouldn't really be that much coding, but ariel's way is better
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
|