Go Back  DVD Talk Forum > General Discussions > Tech Talk
Reload this Page >

Install screen saver from command line (NT/2000)

Tech Talk Discuss PC Hardware, Software, Internet and Other Technology

Install screen saver from command line (NT/2000)

Old 03-01-01, 05:45 PM
  #1  
Mod Emeritus
Thread Starter
 
Join Date: Feb 1999
Location: Gone to the islands - 'til we meet again.
Posts: 19,053
Likes: 0
Received 0 Likes on 0 Posts
If you are using NT or Win2000, you can right click on a screen saver file (.scr) and find multiple options. One of these options is "Install". To the best of my knowledge, this simply sets the selected screen saver as active. Now, I find that I have the need to cause this for all of my users. If I could simply add a line to the login script which could complete this install, it would make my world a better place.

So, anyone know if this is possible?
Old 03-01-01, 07:07 PM
  #2  
Uber Member
 
Join Date: Mar 1999
Location: Overlooking Pearl Harbor
Posts: 16,232
Likes: 0
Received 1 Like on 1 Post
I have no idea, but couldn't you set up a small test workgroup and try it on that?

Or are you asking if the Install command has more far reaching affects than just setting it to the default screen saver?
Old 03-01-01, 07:25 PM
  #3  
Mod Emeritus
Thread Starter
 
Join Date: Feb 1999
Location: Gone to the islands - 'til we meet again.
Posts: 19,053
Likes: 0
Received 0 Likes on 0 Posts
Originally posted by Blade
I have no idea, but couldn't you set up a small test workgroup and try it on that?

Or are you asking if the Install command has more far reaching affects than just setting it to the default screen saver?
I can easily test suggested solutions on a single user, or a group of whatever size I want. The problem is that other than doing the right click and install, I'm not sure how to make the install run. Telling all the users to do it themselves would mean that most of them would never do it. So, I want to be able to automate it. It has to be done for each user as it makes changes to the user profile/registry settings.

Now, I actually do know one way to make the install run... but, it's not a very good way because it's somewhat intrusive. Something that the user never knew was happening would be best. If it's in the script, it will happen over and over until I change the script. Not a real problem, but if the users can see it, they'll complain about it. And, I wouldn't want to change the script too quickly as that might mean some users hadn't logged on during the time frame the install was available.

So, I basically want a command line that will silently install one of the standard screen savers. Does that make more sense?
Old 03-01-01, 07:28 PM
  #4  
X
Administrator
 
X's Avatar
 
Join Date: Oct 1987
Location: AA-
Posts: 10,948
Received 48 Likes on 39 Posts
Blade -

Didn't you do the thumb?

How's that for a hijack?
Old 03-02-01, 02:56 AM
  #5  
Uber Member
 
Join Date: Mar 1999
Location: Overlooking Pearl Harbor
Posts: 16,232
Likes: 0
Received 1 Like on 1 Post
Dead,

Sorry, misunderstood your question.

Here's another bump for you though!

X,

They did it! Seems to be going well. Should be healed in about 6 weeks.
Old 03-02-01, 09:01 AM
  #6  
Mod Emeritus
Thread Starter
 
Join Date: Feb 1999
Location: Gone to the islands - 'til we meet again.
Posts: 19,053
Likes: 0
Received 0 Likes on 0 Posts
Another question along the same lines...

If I'm forced to, I can use the intrusive install method I figured out. Still, this doesn't allow me to do any settings. Is there any way to configure screen savers from a text file or something? You know, set the time before it kicks in and other settings like colors, shapes, etc. that most screen savers have.
Old 03-02-01, 09:19 AM
  #7  
DVD Talk Hall of Fame
 
Join Date: Jan 2000
Location: England (w00t!)
Posts: 7,796
Likes: 0
Received 0 Likes on 0 Posts
No idea if this applies to WinNT and 2K, but in '98, in the system.ini file, under the [Boot] section it's got a line SCRNSAVE.EXE=screen saver file here . If this is the case under NT and 2K, then surely it would be possible to make a simple addition to the login script that checks this file and amends this line if necessary.

Also, along a similar vein, the file control.ini in the System folder has a number of sections entitled [Screen Saver.screen saver name] which contain all the parameters for the Windows screen savers, if you've changed any of their settings from the default configuration. Presumably, if this also is the case under NT and 2K, you could have another script file which just "corrected" the entries to this file if necessary.

I just did a little experimentation, and if you manually alter these lines even while Windows is running, it immediately changes the screen saver settings, so if you really wanted you could schedule the scripts to run every half hour or so, in case people decided to alter the screen saver settings.

Like I say, that's all under Win98, no idea how, if at all, that would translate to NT and 2K. That any help at all?

[Edited by TheyCallHimJim on 03-02-01 at 07:28 AM]
Old 03-02-01, 10:06 AM
  #8  
Mod Emeritus
Thread Starter
 
Join Date: Feb 1999
Location: Gone to the islands - 'til we meet again.
Posts: 19,053
Likes: 0
Received 0 Likes on 0 Posts
Originally posted by TheyCallHimJim
No idea if this applies to WinNT and 2K, but in '98, in the system.ini file, under the [Boot] section it's got a line SCRNSAVE.EXE=screen saver file here . If this is the case under NT and 2K, then surely it would be possible to make a simple addition to the login script that checks this file and amends this line if necessary.

Also, along a similar vein, the file control.ini in the System folder has a number of sections entitled [Screen Saver.screen saver name] which contain all the parameters for the Windows screen savers, if you've changed any of their settings from the default configuration. Presumably, if this also is the case under NT and 2K, you could have another script file which just "corrected" the entries to this file if necessary.

I just did a little experimentation, and if you manually alter these lines even while Windows is running, it immediately changes the screen saver settings, so if you really wanted you could schedule the scripts to run every half hour or so, in case people decided to alter the screen saver settings.

Like I say, that's all under Win98, no idea how, if at all, that would translate to NT and 2K. That any help at all?

[Edited by TheyCallHimJim on 03-02-01 at 07:28 AM]
Hum, none of these entries exist under the default Win2000 setup. I've just edited those files on my machine and there doesn't appear to be any change. I'm going to reboot and see if that does anything for me.
Old 03-02-01, 10:16 AM
  #9  
DVD Talk Hall of Fame
 
Join Date: Jan 2000
Location: England (w00t!)
Posts: 7,796
Likes: 0
Received 0 Likes on 0 Posts
Well, it's very possible that the entries are in a different file. Try this; Pick a screensaver that you're not using at the moment and rename it to something completely bizarre that no other file on your entire computer would be named. Set it as your active screensaver and then do a saerch for any files containing that filename. It might be an idea to look in the registry as well. Also try setting the "Scrolling Text" screensaver to display some really weird text, and search for that too, which should help you pin down where the screen sver configuration settings live. That;s what I did to pin down where the screen saver setting lived under Win98, so I don't see why it shouldn't work under 2K...
Old 03-02-01, 11:20 AM
  #10  
Mod Emeritus
Thread Starter
 
Join Date: Feb 1999
Location: Gone to the islands - 'til we meet again.
Posts: 19,053
Likes: 0
Received 0 Likes on 0 Posts
Originally posted by TheyCallHimJim
Well, it's very possible that the entries are in a different file. Try this; Pick a screensaver that you're not using at the moment and rename it to something completely bizarre that no other file on your entire computer would be named. Set it as your active screensaver and then do a saerch for any files containing that filename. It might be an idea to look in the registry as well. Also try setting the "Scrolling Text" screensaver to display some really weird text, and search for that too, which should help you pin down where the screen sver configuration settings live. That;s what I did to pin down where the screen saver setting lived under Win98, so I don't see why it shouldn't work under 2K...
Ok, I rebooted... still no go. I'm afraid that the screen saver simply uses the Registry settings to designate which is active. I could force these settings on the users and make it active, but that would have an effect on more than just the screen saver. And, it still wouldn't allow me to actually configure the screen saver... you know, like add the text to the scrolling test screen saver or such. Crap this is way too hard!
Old 03-02-01, 11:42 AM
  #11  
DVD Talk Gold Edition
 
Join Date: Sep 1999
Location: Boston, MA
Posts: 2,256
Likes: 0
Received 0 Likes on 0 Posts
The .SCR file is actually an ordinary .EXE program.

Every .EXE program should support as part of its API the following command line switches
  • /s or no arguments at all: Screensaver mode, run the screensaver itself
  • /c: Configuration mode, display configuration window (most screensaver have a configuration form where you can change settings like speed, color or whatever)
  • /p: Preview mode, run screensaver in the little Display Settings window.

Now, to install from a command line, you can run this command from a login-script
rundll32.exe desk.cpl,InstallScreenSaver XYZ.SCR

rundll32 is the standard program that is part WinBlows system. desk.cpl is the configuration control panel for desktop settings and InstallScreenSaver is the command.

I tested this using my WinNT server, but it should work for other OS as well. Let me know how it goes.

Old 03-02-01, 11:43 AM
  #12  
DVD Talk Hall of Fame
 
Join Date: Jan 2000
Location: England (w00t!)
Posts: 7,796
Likes: 0
Received 0 Likes on 0 Posts
Well, even if they are stored in registry keys, the same technique applies, surely? I doubt that even Microsoft would be as convoluted as to store screen saver settings as anything other than plain text; if so, it's simply a case of finding which keys relate to the screensaver and its options. Did you try the method I mentioned above only searching for data in registry keys? That's seem like the obvious way to go; change the name of one of your .SCR files to something really unusual that'll be easy to find, make it the active one and get searching those registry keys... Ditto for finding the screen saver options, they've gotta be stored in a similar manner, so set the active screen saver to the Scrolling Text one, make the text it uses something noticeable, and just search for that text in the registry. It'll take a while for it to sort through all those keys, but I'm sure it's gotta be in there somewhere. Basically, what possible motive could they have for making the screen saver settings any more concealed than is necessary? And it stands to reason that if it ain't stored in a plain text file somewhere, they're in a registry key. Just a matter of finding out which one...
Old 03-02-01, 02:57 PM
  #13  
Mod Emeritus
Thread Starter
 
Join Date: Feb 1999
Location: Gone to the islands - 'til we meet again.
Posts: 19,053
Likes: 0
Received 0 Likes on 0 Posts
Originally posted by kinky
The .SCR file is actually an ordinary .EXE program.

Every .EXE program should support as part of its API the following command line switches
  • /s or no arguments at all: Screensaver mode, run the screensaver itself
  • /c: Configuration mode, display configuration window (most screensaver have a configuration form where you can change settings like speed, color or whatever)
  • /p: Preview mode, run screensaver in the little Display Settings window.

Now, to install from a command line, you can run this command from a login-script
rundll32.exe desk.cpl,InstallScreenSaver XYZ.SCR

rundll32 is the standard program that is part WinBlows system. desk.cpl is the configuration control panel for desktop settings and InstallScreenSaver is the command.

I tested this using my WinNT server, but it should work for other OS as well. Let me know how it goes.

This is what I was refering to as the "intrusive" way to install it. This brings up a window which will indicate which screensaver I have selected for them. What it won't do is change the settings for the screen saver. Well, at least I couldn't get it to do it. Try to set the text, position or speed in the Scrolling Text Screen Saver ssmarque.scr) using the above. If you can figure out how to do it, let me know!
Old 03-02-01, 03:00 PM
  #14  
Mod Emeritus
Thread Starter
 
Join Date: Feb 1999
Location: Gone to the islands - 'til we meet again.
Posts: 19,053
Likes: 0
Received 0 Likes on 0 Posts
Originally posted by TheyCallHimJim
Well, even if they are stored in registry keys, the same technique applies, surely? I doubt that even Microsoft would be as convoluted as to store screen saver settings as anything other than plain text; if so, it's simply a case of finding which keys relate to the screensaver and its options. Did you try the method I mentioned above only searching for data in registry keys? ... And it stands to reason that if it ain't stored in a plain text file somewhere, they're in a registry key. Just a matter of finding out which one...
Unfortunately, Microsoft isn't known for the great reasoning skills! I used the text on one of the screen savers and inserted my name, then searched the Registry. No matches on the search. It may be in a plain text file, but I can't seem to find it. I've looked through everything in the profile, but there doesn't seem to be anything obvious. And, it seems it has to be either in the profile or the Registry since it's different for every user.

Still, I beieve that it has to be somewhere simple... I just can't find it!
Old 03-02-01, 03:06 PM
  #15  
DVD Talk Gold Edition
 
Join Date: Sep 1999
Location: Boston, MA
Posts: 2,256
Likes: 0
Received 0 Likes on 0 Posts
Originally posted by Dead
Originally posted by kinky
The .SCR file is actually an ordinary .EXE program.

Every .EXE program should support as part of its API the following command line switches
  • /s or no arguments at all: Screensaver mode, run the screensaver itself
  • /c: Configuration mode, display configuration window (most screensaver have a configuration form where you can change settings like speed, color or whatever)
  • /p: Preview mode, run screensaver in the little Display Settings window.

Now, to install from a command line, you can run this command from a login-script
rundll32.exe desk.cpl,InstallScreenSaver XYZ.SCR

rundll32 is the standard program that is part WinBlows system. desk.cpl is the configuration control panel for desktop settings and InstallScreenSaver is the command.

I tested this using my WinNT server, but it should work for other OS as well. Let me know how it goes.

This is what I was refering to as the "intrusive" way to install it. This brings up a window which will indicate which screensaver I have selected for them. What it won't do is change the settings for the screen saver. Well, at least I couldn't get it to do it. Try to set the text, position or speed in the Scrolling Text Screen Saver ssmarque.scr) using the above. If you can figure out how to do it, let me know!

hmm .... isn't this what you are talking about ???

[HKEY_CURRENT_USER\Control Panel\Screen Saver.Marquee]
"Font"="Times New Roman"
"Size"="24"
"Text"="Your text goes here."
"TextColor"="255 0 255"
"BackgroundColor"="0 0 128"
"Mode"="1"
"Speed"="14"
"CharSet"="0"


Store these settings in a xxx.reg file and load them in the login script, enable the screensaver ... and voila !!!

Old 03-02-01, 04:53 PM
  #16  
Mod Emeritus
Thread Starter
 
Join Date: Feb 1999
Location: Gone to the islands - 'til we meet again.
Posts: 19,053
Likes: 0
Received 0 Likes on 0 Posts
Originally posted by kinky

hmm .... isn't this what you are talking about ???

Duh, yes!! I don't know how I overlooked that key!!

Thanks for helping out my failing mind!

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Thread Tools
Search this Thread

Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service - Do Not Sell My Personal Information -

Copyright 2021 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.