Intercept ScreenSaver

JackShum
10-14-2004, 01:34 AM
Hi,
What I am trying to do is to log out users from Windows2000 when keyboard and mouse have been idle for some time.
Would this be easy if I write a vb program and compile it. Then rename it to myss.scr.
In the vb program I do 2 things in form load event:
1. Call a window api function to logout user
2. Call to run another screensaver.scr program that windows provided.

Then I worry user will change the screensaver settings in control panel and my goal to logout user automatically after n minutes keyboard and mouse idle will not work. Thus I need a way to keep user from change the screensaver settings.

If anyone know this works, please guide me on the coding. Or there is a better way to do. Thank you!

jjStinger72
10-14-2004, 07:45 AM
there already is a screensaver that does this. WINEXIT.SCR. it comes in the windows resourse kit. You can google for Winexit.scr or just pick up the windows 2003 resource kit...
http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
The screensaver should work on any Windows OS (9x - XP).

as far as preventing the user from changing the screensaver. This is possible as well.

here's the link
(for some reason i couldn't get to this link from FireFox. IE brings it up though :mad:)
http://www.microsoft.com/resources/documentation/Windows/2000/server/reskit/en-us/Default.asp?url=/resources/documentation/Windows/2000/server/reskit/en-us/w2rkbook/document_conventions.asp

SCRNSAVE.EXE
HKCU\Software\Policies\Microsoft\Windows\Control Panel\Desktop

Data type Range Default value
REG_SZ Path and file name (There is no default value for this entry.)

Specifies the screen saver used, and prevents users from changing it.

This entry stores the setting of the Screen saver executable name Group Policy. Group Policy adds this entry to the registry when you enable the policy. If you disable the policy or set it to Not configured, Group Policy deletes this entry from the registry.

robertdeniro
10-14-2004, 07:50 AM
Check out this link b4 it disappears:
http://www.winguides.com/forums/showflat.php?Cat=&Board=brdQuestions&Number=118341&page=0&view=expanded&sb=5&part=

BTW, if users don't need to be fiddling with any display settings, you can just disable the Display Control Panel applet completely using Group Policy, and then even changing security permissions on the "desk.cpl" file.

You can put this in a reg file as a startup script for all users. Use the Group Policy snapin to setup a logon/logoff script for all users.

You don't need to do the second part of your question. Just logoff the current user - the "Press Ctlr-Alt-Del" screen will be displayed for the next user.
Remember that a screensaver(or any app for that matter) can only be run if a user is logged on - and you just logged 'em off.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum