|
-
Feb 3rd, 2010, 02:53 AM
#1
Thread Starter
Lively Member
[RESOLVED] Help me with regedit
1. I have a regfile in my RESOURCE
2. I Copied it to my systemdrive.
My.Computer.FileSystem.WriteAllBytes(Environ("%systemdrive%") & "\regfile.reg", My.Resources.regfile, 0)
3. I added the code to add it to registry.
Dim str As String = Environ("%systemdrive%")
Process.Start("regedit", str & "\regfile.reg")
4. Till this step everything is working fine, now all i want is to add this file in silent mode.
Any idea how to do that.
< advertising link removed by moderator >
-
Feb 3rd, 2010, 05:44 AM
#2
Thread Starter
Lively Member
Re: Help me with regedit
Process.Start("regedit", & "/s" & str & "\regfile.reg")
This don't work any ideas how to make reg file merge silently
< advertising link removed by moderator >
-
Feb 3rd, 2010, 08:53 AM
#3
Re: Help me with regedit
 Originally Posted by riteshtechie
This don't work any ideas how to make reg file merge silently
Try adding a space after /s as shown below
Code:
Process.Start("regedit", & " /s " & str & "\regfile.reg")
If that fails try adding the full path to regedit also
-
Feb 3rd, 2010, 09:13 AM
#4
Re: Help me with regedit
I would try one of the overloads of Process.Start.
Code:
Process.Start("RegEdit.exe", "/s " & str & "\regfile.reg")
-
Feb 3rd, 2010, 09:14 AM
#5
Thread Starter
Lively Member
Re: Help me with regedit
@Kevin
That line gives error
Error 1 Expression expected.
@Joacim: thanks that worked
< advertising link removed by moderator >
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
|