Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set screensaver in batch file 1

Status
Not open for further replies.

pokermat

Programmer
Jan 17, 2002
44
GB
Hello

In users login, I copy our company screensaver to the appropriate path on the users machines.

Does anyone know how I can set this as the default screensaver in the same login?

Thanks...
 
If all your users are on 95/98 machines the default screensaver data is stored in the SYSTEM.INI file (in the local Windows Directory) in the BOOT section such as:

[boot]
.....
.....
SCRNSAVE.EXE=C:\WINDOWS\SYSTEM\MYPICT~1.SCR

Therefore, your script must be able to change that part of the file ONLY. If the user doesn't erase the actual ss file then you only need to have that section changed when logging in (otherwise you're coping the same file over and over everyday...for some reason 'slow preformance' comes to mind...LOL

Your best bet is to have a program change that line for you. Also, have the prog check to see if the file is missing and if so then "maybe" activate another script to actually copy the file over.

If I'm not mistaken 9x comes with QBasic (installable from the OEM disk..if not already installed in COMMAND folder). You can create a BAS file that will check for the file's existance and run "install script" and/or "rename the screensaver" procedure.

Let me know if this is of interest to you.

--MiggyD
 
Thanks for that MiggyD...that was exactly what I was looking for.

In an ideal world all users would be using the same OS. However, we have a mixture of 95/98 & 2000. Having looked at the System.ini file on my 2000 machine, there is no screensaver info. Do you know how to do the same thing on a 2000 machine?

Thanks again for your help, it is much appreciated.
 
I'm not sure but I believe it's in the registry. If not, it may be in the personnal settings folder. I'll try and see if it can be found.
 
MiggyD - if you are interested, you were right about the registry. I used a 'Kix' script to set up the screensaver.

? Set screensaver active
WriteValue("HKEY_CURRENT_USER\Control Panel\Desktop","ScreenSaveActive","1","REG_SZ")

? Set screensaver timeout
WriteValue("HKEY_CURRENT_USER\Control Panel\Desktop","ScreenSaveTimeOut","600","REG_SZ")

? Set screensaver
WriteValue("HKEY_CURRENT_USER\Control Panel\Desktop","SCRNSAVE.EXE","C:\WINNT\System32\EXPEDI~1.SCR","REG_SZ")

Thanks again.
 
Glad you found it. I had a "crisis" at work after I posted and forgot to check on it. Thanks for the confirmation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top