#70174 - 2002-11-21 03:48 PM
Re: HKU/@SID vs HKCU
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Enumerate this key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
to get a list of all profiles. You can enumerate HKU to see which ones are active.
I have some Perl code that can be run as an ADMIN and it will load ALL profiles hives not currently loaded so that manipulate them. Maybe that is the process you want to code in KiXtart.
|
|
Top
|
|
|
|
#70184 - 2002-11-25 02:10 PM
Re: HKU/@SID vs HKCU
|
TomV
Fresh Scripter
Registered: 2002-11-25
Posts: 7
|
Maybe i am a little off, but why would you want to change a screensaver setting for users that are not logged on?
If you change the Hkey_Users\.DEFAULT\etc\etc settings every new user on that system will get these settings. Every other user that logs on gets the HKCU - registry setting through the logon-script. Why bother with the SID?
_________________________
Tom
;-)
|
|
Top
|
|
|
|
#70185 - 2002-11-26 02:28 PM
Re: HKU/@SID vs HKCU
|
littleJean
Fresh Scripter
Registered: 2002-11-20
Posts: 8
Loc: luxembourg
|
thanks for your help.
break on dim $filter[0] $filter[0] = 'Computer' $objDomain = GetObject('WinNT://' + @DOMAIN + ',domain') $objDomain.Filter = $filter for Each $OC in $objDomain ? $OC.Name $Index = 0 do $Sid = ENUMKEY("\\" + $OC.Name + "\" + "HKEY_USERS", $Index) $Error = @Error if NOT @ERROR if substr($Sid,1,8) <> ".DEFAULT" ;timeout : 30 minutes. ;$res=WRITEVALUE("\\"+$OC.Name+"\HKEY_USERS\$Sid\Control Panel\Desktop","ScreenSaveTimeOut","1800","REG_SZ") ;Activate it $res=WRITEVALUE("\\"+$OC.Name+"\HKEY_USERS\$Sid\Control Panel\Desktop","ScreenSaveActive","1","REG_SZ") ;specify screensaver $res=WRITEVALUE("\\"+$OC.Name+"\HKEY_USERS\$Sid\Control Panel\Desktop","SCRNSAVE.EXE","C:\WINNT\System32\logon.scr","REG_SZ") ;Activate password protection $res=WRITEVALUE("\\"+$OC.Name+"\HKEY_USERS\$Sid\Control Panel\Desktop","ScreenSaverIsSecure","1","REG_SZ") ;Disable screensaver properties $res=WRITEVALUE("\\"+$OC.Name+"\HKEY_USERS\$Sid\Software\Microsoft\Windows\CurrentVersion\Policies\System","NoDispScrSavPage","1","REG_DWORD") endif else if @ERROR and @ERROR <> 259 ? 'Error : ' + @ERROR + ' ' + @SERROR logevent(2,1,$OC.Name+' '+@SERROR,'','Test10.kix') endif endif $Index = $Index + 1 Until $Error Next
Do you think that I must convert in UDF, for others to use ?
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 5421 anonymous users online.
|
|
|