Bat File

K

Kyle

I have a bat file that edits the registry...

regedit.exe \\comptuername\exportedregfile1.reg
regedit.exe \\comptuername\exportedregfile1.reg

When I run the bat file from the computer by double-clicking, it works
fine and the registry is edited correctly but when I put it in Computer
Configuration / Windows Settings / Scripts for my GPO, it does not
work. Why is this?
 
L

lforbes

Kyle said:
I have a bat file that edits the registry...

regedit.exe \comptuernameexportedregfile1.reg
regedit.exe \comptuernameexportedregfile1.reg

When I run the bat file from the computer by double-clicking,
it works
fine and the registry is edited correctly but when I put it in
Computer
Configuration / Windows Settings / Scripts for my GPO, it does
not
work. Why is this?

Hi,

Try putting in the /s switch which makes it silent. It is waiting for
the "ok" click. Also make sure you have quotes if you have spaces
in the name.

regedit.exe /s \\comptuername\exportedregfile1.reg

Cheers,

Lara
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top