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.

 

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
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:



(not displayed)


 
 
 
 
 

Live Comment Preview:

 
«February»
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910