Video Screencast Help
Symantec Appoints Michael A. Brown CEO. Learn more.

Screen Saver WMI Script HKEY_CURRENT_USER

Created: 05 Oct 2012

Greetings

I am trying to use the following script to lock down our users screen savers.  The script works when I run it on the desktop of a user with admin rights but of couse it fails for user without admins.  It appears the only correct why to push it out from Altiris is using the option "Current logged-on user" which again stops me becasue they don't have admin rights.  Does anyone know I can push the folowing script via Altiris? 

A. My goals

1. Set Time of Screensaver to 30 mins and lock PC

2.  Create the "System" key and NoDispScrSavPage dword

B. Script

HKEY_CURRENT_USER = &H80000001

strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & _
    strComputer & "\root\default:StdRegProv")

strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Policies\System"
strKeyPath0 = "Control Panel\Desktop"

objRegistry.CreateKey HKEY_CURRENT_USER, strKeyPath0

ValueName0 = "ScreenSaveActive"
strValue0 = "1"
objRegistry.SetStringValue HKEY_CURRENT_USER, strKeyPath0, ValueName0, strValue0

ValueName1 = "ScreenSaveTimeout"
strValue1 = "1800"
objRegistry.SetStringValue HKEY_CURRENT_USER, strKeyPath0, ValueName1, strValue1

objRegistry.CreateKey HKEY_CURRENT_USER, strKeyPath                

strValueName = "NoDispScrSavPage"
dwValue = "1"
objRegistry.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, strValueName, dwValue

 

Thank you !