Results 1 to 5 of 5

Thread: [RESOLVED] Help me with regedit

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2009
    Posts
    76

    Resolved [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 >

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Sep 2009
    Posts
    76

    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 >

  3. #3
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,714

    Re: Help me with regedit

    Quote Originally Posted by riteshtechie View Post
    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

  4. #4
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Help me with regedit

    I would try one of the overloads of Process.Start.
    Code:
    Process.Start("RegEdit.exe", "/s " & str & "\regfile.reg")

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Sep 2009
    Posts
    76

    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
  •  



Click Here to Expand Forum to Full Width