I´m back after a long time ...
by comparing the results from Sysinternals PSGETSID-Utility
and by my own following script:
Code:
$Index=0
:LOOP1
$ValueName = ENUMKEY("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList", $Index)
; ? $ValueName
If @ERROR = 0
$PartValue=Right($ValueName,4)
$Index = $Index + 1
If $PartValue="-500"
$x=LEN($ValueName)-4
$WSSID=Left($ValueName,$x)
? $WSSID
Endif
goto Loop1
Endif
GET $X
I get different results. The problem is, that my script stops at the first key found which is ending with -500 an displays this as Workstation-SID. However there is another key ending with -500 on my computer and this "last" key ending with -500 should be the right workstation-SID from the SID-History.
Anyone can please tell me how I can alter my code to correct this,
or a better way to enumerate the last key ending with -500.
---> UPDATE: It´s NOT the last key found ending with -500.
So I need to determine a way to find out which one of the -500 is the right ...
Regards,
Luziekix
Edited by Luziekix (2006-10-19 01:24 PM)