Silent .BAT files??

I've got a .BAT file in the start menu of all the machines we run our automation scripts on.  This .BAT file will update the registry to "turn off" the screen saver.  We have to do this for two reasons--1) QTP will bomb if a screensaver kicks in and 2) the Net Nazis where I work have disabled the GUI used to set the screensaver settings.

Yes I know its a hack but what choice do I have.

My problem with this .BAT file is this:  On 2 of the 5 machines, it runs completely silently.  No fuss no dialogs, nothing.

On the other 3 I get the "Would you like to make these changes to the Registry" dialogs.

The .BAT code is

REGEDIT /s /i screensaver.reg


 Which I thought would run silently and in 2 cases it does.   All five machines are Win XP Pro.

Is there anyone out there in the Geekdom who can suggest how to make this .BAT silent everywhere?

Much respect if you can.

 

posted @ Friday, August 17, 2007 9:53 AM

Print

Comments on this entry:

# re: Silent .BAT files??

Left by Carl at 8/17/2007 10:49 AM
Gravatar
What does the /i switch do? I thought that it was just regedit /s <regfile>?

Carl

# re: Silent .BAT files??

Left by Carl at 8/17/2007 11:00 AM
Gravatar
Have you tried:

reg.exe import screensaver.reg

?

That might work.

Carl

# re: Silent .BAT files??

Left by Maryanne Sweat at 8/17/2007 1:20 PM
Gravatar
Making Carl's change doesn't suppress the messages from Windows when the .bat is run on Startup.

Interestingly, if you run the .bat after startup there is no messaging. Only when its run in the Startup menu on login.

Your comment:



 (will not be displayed)


 
 
 
 
 

Live Comment Preview:

 
«November»
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345