Sign in to follow this  
Followers 0
sjorrel

Stopping the screensaver?

6 posts in this topic

Is there an easy way of preventing the screensaver becoming active after a period of inacitivity within Autoit?

Share this post


Link to post
Share on other sites



You could try disabling it via the registry when your script starts (not guaranteed but worth a try):

; Remember current screen saver setting
Local $ScrnSaver = RegRead('HKCU\Control Panel\Desktop', 'SCRNSAVE.EXE')

; Disable if one is set
RegDelete('HKCU\Control Panel\Desktop', 'SCRNSAVE.EXE')

When your script finishes:

; Reset screen saver
If $ScrnSaver Then RegWrite('HKCU\Control Panel\Desktop', 'SCRNSAVE.EXE', 'REG_SZ', $ScrnSaver)

Share this post


Link to post
Share on other sites

@lxp: this only works when you have admin-rights, i suggest by the way he asks that he hasn't got them B) nothing personal just a guess :o

I've created a script to automatically install about 7 pieces of software without user intervention, but the screen saver - when set on an XP machine to "go back to login screen" is sometimes causing problems.

Share this post


Link to post
Share on other sites

No, admin rights aren't required to write to HKEY_CURRENT_USER.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0