Is there a way to import a registry key to remote computers with a bat file?

Comments

7 comments

  • Glenn Pearson

    Also I would like to suppress the regedit popup on the remote computers.

    0
    Comment actions Permalink
  • Shawn Anderson

    Yes. Two points; you can do this natively in PDQ Deploy. You can also do this in a bat file. 

    In PDQ Deploy, where it asks for the Install File, select your exported reg file. 

    To do this within a bat file, simply call the following in your .bat:

    regedit.exe /s "regkey.reg"

    Just be sure that the regkey file is at the same directory level as your bat file.

    Here's an image showing how this is done natively in PDQ Deploy. The Step 1 simply calls the reg file. NOTE: In PDQ Deploy Pro Mode, you are able to use multiple steps (for calling other installs, scripts, or commands). 

    bat-reg.png

    0
    Comment actions Permalink
  • Glenn Pearson

    Thanks Shawn - I have a bat file which calls for the key which is on a network share and tested it on my computer but the regedit.exe dialog still appears even with the /s switch. my bat file is named this way: @Echo Off
    regedit.exe /s \\fileshare\myregfile.reg.

    The machines are Windows 7 btw.

    Thanks

    0
    Comment actions Permalink
  • Shawn Anderson

    Try copying the reg file to the same directory where your bat file is stored. Then check the "Include Entire Directory" in the PDQ Deploy package. That will copy the bat file and the regfile (and any other file or directory by the bat file) down to the local target computer before executing.

    0
    Comment actions Permalink
  • Glenn Pearson

    That did the trick - thanks Shawn

    0
    Comment actions Permalink
  • SelfMan

    just one more hint... instead of using a reg file, you can also use the reg command.

    Read more here http://technet.microsoft.com/en-us/library/cc742162(v=ws.10).aspx

    0
    Comment actions Permalink
  • Glenn Pearson

    Thanks SelfMan - good stuff there!

    0
    Comment actions Permalink

Please sign in to leave a comment.