Monday, November 22, 2010

How to run this script on my computer?

hi, i have no programming experience, but i'd like to be able to run a script on my computer, which changes the screensaver idle time (the script is below). How do I run this on my computer?



Do I make a .bat file somehow? Through command prompt? How?



Here's the script:



HKEY_CURRENT_USER = %26amp;H80000001

strComputer = ';.';

Set objReg = GetObject(';winmgmts:\\'; %26amp; strComputer %26amp; ';\root\default:StdRegProv';)

strKeyPath = ';Control Panel\Desktop';

objReg.CreateKey HKEY_CURRENT_USER, strKeyPath

ValueName = ';ScreenSaveTimeout';

strValue = ';3000';

objReg.SetStringValue HKEY_CURRENT_USER, strKeyPath, ValueName, strValueHow to run this script on my computer?
Yes open a text file in Notepad, paste this, name the file Something.bat or whatever. Choose ALL FILES instead of .txt and that should do it.



Under save asHow to run this script on my computer?
Yes. Try to put this script into a bat file and run it from cmd window.



Thanks,

Dinesh
Looks like its a VBS script. Try save as, then change file type to 'All Files'



Save it as screensaver.vbs (the name can be anything, as long as it has the .vbs extension at the end). Then find it and run or put it in the start up folder in the START menu.
Open a new file in Notepad. Paste in the script. Save it with a .vbs extension - choose ';all files'; as the type to save.



When you double-click the icon of the file, it'll run and change the screensaver timeout to 3 seconds.

No comments:

Post a Comment