Page 1 of 1 1
Topic Options
#211948 - 2016-09-12 10:48 PM admin script on Remote machine HKU\$sid
sambapdc Offline
Just in Town

Registered: 2014-12-14
Posts: 2
Loc: italy
hello, my problem is this script

 Code:
$remotepcname=@WKSTA

for $counter=0 to 256
 $sid=enumkey("\\"+$remotepcname+"\HKU",$counter)
 if @error
  $counter=256
 else
 $=writevalue("\\"+$remotepcname+"\HKU\"+$sid+"\software\Policies\Microsoft\Internet Explorer\Restrictions" , "NoBrowserOptions","1","REG_DWORD")
 endif
next


All subkeys are written under \HKU\sid. On my workstation are written :
.DEFAULT
S-1-5-18
S-1-5-19
etc.etc..
and subkeys (SID) other domain users logged that should not have this policy

would like to associate the domain user with his sid

Thanks in advance


Edited by Arend_ (2016-09-13 11:16 AM)
Edit Reason: Please use code tags

Top
#211949 - 2016-09-13 11:25 AM Re: admin script on Remote machine HKU\$sid [Re: sambapdc]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Why don't you use the HKCU key when people log on?
But you can use the Kix function SidToName() to translate.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1202 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.049 seconds in which 0.022 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org