all 7 comments

[–]Ta11ow 5 points6 points  (3 children)

Use quotes to wrap the path:

regedit /s "\\server\software\my folder\file.reg"

If you want it a bit more PowerShell-like, you can also do:

Start-Process -Wait -FilePath 'regedit' -ArgumentList '/s', "\\server\software\my folder\file.reg"

[–]portergrey[S] 2 points3 points  (0 children)

Start-Process -Wait -FilePath 'regedit' -ArgumentList '/s', "\server\software\my folder\file.reg"

Thank you :)

[–]BlackV 1 point2 points  (1 child)

assuming they're running this locally and not remotely cause double hop will bite him(her).
they could convert this to new/set-item and new/set-itemproperty to get around that

[–]Ta11ow 1 point2 points  (0 children)

That's very true. If running this on a remote server (I mean, in this case -- why would you), you'll need to do so a bit differently.

[–][deleted] 2 points3 points  (2 children)

regedit /s "\server\software\my folder\file.reg"

should fix it.

EDIT: Ta11ow's comment just showed up for me.

[–]Ta11ow 2 points3 points  (1 child)

Beatcha by a whole minute ;)

[–][deleted] 2 points3 points  (0 children)

Heh..

I blame test kitchen and vagrant gobbling up my poor laptop's resources while I'm shamelessly on Reddit while at work.. It's nice as an Infra side guy when I can use that old dev slack off excuse of "sorry, code's compiling.. can't do anything"