Okay, this is the same script I have been working on for 3 days now, WOOHOO! It is certainly coming along, but I am having some issues wit hthe screensaver. All of the changes are being done remotely from a PC having a logged in user with domain admin priv. The workstation I am testing on is a w2k with service pack 4. I have browsed throughout the site looking for similar issues and I am trying the solutions, but I don't get the results I want. The problem I am having is that even though I set the screensaver in both keys mentioned throughout the site the screen saver when browsed through display properties say there is "none" specified. I check the keys, I restart the system, but still no dice. I even tried writing to system.ini based on another thread...nothing. If I could get some fresh eyes to look at my script and see where it is I am going wrong, that would be awesome. I am also using the latest version of Kix. I think that is everything can include, if I have left something out, just ask. Thanks.

Code:

Dim $RID, $regKUpwr, $regDefpwr, $regKUdesk, $regKUcpl, $regLMcpl, $regLMCV, $r, $comp, $sysini
Dim $SID, $domain, $user, $HKU, $HKLM, $u, $SystemRoot, $DEFAULT, $IE, $IEshare, $cshare


Call getsid.kix
Call loggedinusers.kix
Call StopProc.kix

$domain = "SALCO1"
$comp = "TESTBOX"
$tcomp = "\\" + $comp
$HKU = "\HKEY_USERS\"
$HKLM = "\HKEY_LOCAL_MACHINE"
$DEFAULT = $HKU + ".DEFAULT"

$u = loggedinusers($comp)

If Ubound($u) = -1
? "Noone Logged in"
Else
$user = $u[0]
$user = Split($user,"\")[1]
$IE = "C:\Documents And Settings\" + $user + "\Application Data\Microsoft\Internet Explorer"
$IEshare = "\C$\Documents And Settings\" + $user + "\Application Data\Microsoft\Internet Explorer"
$SID = getsid("WinNT://" + $domain+ "/" + $user + ",USER")
$regKUpwr = $HKU + $SID + "\Control Panel\PowerCfg"
$regDefpwr = $DEFAULT + "\Control Panel\PowerCfg"
$regKUdesk = $HKU + $SID + "\Control Panel\Desktop"
$regKUcpl = $HKU + $SID + "\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"
$regLMcpl = $HKLM + "\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"
$regKUCV = $HKLM + "\SOFTWARE\Microsoft\Windows NT\CurrentVersion\"
$regKUPoldesk = $HKU + $SID + "\Software\Policies\Microsoft\Windows\Control Panel\Desktop"
$SystemRoot = ReadValue($tcomp + $regKUCV,"SystemRoot")

Select
Case $SystemRoot = "c:\WINNT"
$cshare = "\c$\winnt"
Case $SystemRoot = "c:\windows"
$cshare = "\c$\windows"
Case 1
? "boo"
EndSelect
$sysini = $cshare + "\System.ini"

$RID = Split($SID,"-")[7]
If $RID = 500
? $RID
Else
EndIf

$r = WriteValue($tcomp + $regKUpwr,"CurrentPowerPolicy","3","REG_SZ")
$r = WriteValue($tcomp + $regDefpwr,"CurrentPowerPolicy","3","REG_SZ")

;$r = WriteValue($tcomp + $regKUcpl,"NoControlPanel","1","REG_DWORD")
;$r = WriteValue($tcomp + $regLMcpl,"NoControlPanel","1","REG_DWORD")

$r = WriteValue($tcomp + $regKUdesk,"ScreenSaverIsSecure","1","REG_SZ")
$r = WriteValue($tcomp + $regKUdesk,"ScreenSaveActive","1","REG_DWORD")
$r = WriteValue($tcomp + $regKUdesk,"SCRNSAVE.EXE", $SystemRoot + "\system32\logon.scr","REG_SZ")
$r = WriteValue($tcomp + $regKUPoldesk,"ScreenSaverIsSecure","1","REG_SZ")
$r = WriteValue($tcomp + $regKUPoldesk,"ScreenSaveActive","1","REG_DWORD")
$r = WriteValue($tcomp + $regKUPoldesk,"SCRNSAVE.EXE", $SystemRoot + "\system32\logon.scr","REG_SZ")

Copy salco.bmp $tcomp + "\c$"
If Exist($tcomp + $IEshare + "\Internet Explorer Wallpaper.bmp")
Del $tcomp + $IEshare +"\Internet Explorer Wallpaper.bmp"
Else
EndIf

If Exist($tcomp + $IEshare + "\Internet Explorer Wallpaper.bmp")
Del $tcomp + $IEshare + "\Internet Explorer Wallpaper.bmp"
Else
EndIf

If Exist($tcomp + $cshare + "\Webshots for " + $user + ".bmp")
Del $tcomp + $cshare + "\Webshots for " + $user + ".bmp"
Else
EndIf

If Exist($tcomp + $cshare + "\webshots.scr")
StopProc("Webshots.scr",$comp)
Del $tcomp + $cshare + "\webshots.scr" /f
Else
EndIf

MD $tcomp + $cshare + "\Webshots for " + $user + ".bmp"
MD $tcomp + $cshare + "\webshots.scr"
MD $tcomp + $IEshare + "\Internet Explorer Wallpaper.bmp\"

If $SystemRoot + "\System32\logon.scr" <> ReadProfileString($tcomp + $sysini,"boot","scrnsave.exe")
$r = WriteProfileString($tcomp + $sysini,"boot","scrnsave.exe",$SystemRoot + "\System32\logon.scr")
? @SERROR
Else
EndIf

$r = WriteValue($tcomp + $regKUdesk,"Wallpaper","C:\salco.bmp","REG_SZ")
$r = WriteValue($tcomp + $regKUdesk,"WallpaperStyle","0","REG_SZ")
EndIf

_________________________
Micah Davis "A truly wise man never plays leapfrog with a unicorn."