#210546 - 2015-08-18 03:35 AM
Re: @userid and startup script / gpo script
[Re: Lonkero]
|
Allen
KiX Supporter
   
Registered: 2003-04-19
Posts: 4562
Loc: USA
|
The setup issues include:
Not running at startup every time. Wait for Network is enabled, but didnt seem to make a difference. Seems almost like it was random when it would run.
The batch file was running but kix was not. Finally got this sorted, but I am not sure I have it right. The following link, if #1 correct, is probably the reason I was having trouble, as I did not have it configured this way. http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=20568#Post20568
Have yet to access another share with files in them, other than the Sysvol\GPO\Script folder. I read the GPO script needed Read/Execute for Domain Computers and or System. Neither were working when I left.
The reason for wanting to know if the script is running as System is because I was envisioning using the same script for GPO for deployment, and for the traditional logon script.
Something like...
if "System"
;do system stuff
else
;do user stuff
endif
|
|
Top
|
|
|
|
#210550 - 2015-08-18 06:16 AM
Re: @userid and startup script / gpo script
[Re: Lonkero]
|
Allen
KiX Supporter
   
Registered: 2003-04-19
Posts: 4562
Loc: USA
|
Tomorrow I'll try these out... think I like the System() one better.
if @userid=System()
endif
function System
$System=@wksta + "$"
endfunction
function IsSystem()
if @userid=@wksta + "$"
$IsSystem=1
endif
endfunction
Do you have any insight on the perms for other shares?
|
|
Top
|
|
|
|
#210674 - 2015-09-02 06:07 AM
Re: @userid and startup script / gpo script
[Re: Allen]
|
Allen
KiX Supporter
   
Registered: 2003-04-19
Posts: 4562
Loc: USA
|
To Update this thread... still not sure if this is a bug in kix or not. Running whoami always returns System. Sent an email to Ruud, awaiting his response.
Using Kix 4.66, @userid = on Windows 7 =System on Windows 8.1=Computername$ on Windows 10 =Computername$
To address these inconsistencies...
function System()
if @userid="System"
$System=@userid
else
$System=@wksta + "$"
endif
endfunction
|
|
Top
|
|
|
|
#210678 - 2015-09-02 03:43 PM
Re: @userid and startup script / gpo script
[Re: Lonkero]
|
Allen
KiX Supporter
   
Registered: 2003-04-19
Posts: 4562
Loc: USA
|
Ha, you are absolutely correct...
Hmmm
Edited by Allen (2015-09-02 04:27 PM)
|
|
Top
|
|
|
|
#210679 - 2015-09-02 04:38 PM
Re: @userid and startup script / gpo script
[Re: Allen]
|
Allen
KiX Supporter
   
Registered: 2003-04-19
Posts: 4562
Loc: USA
|
Haven't used this yet, but maybe this one will make more sense.
Function IsSystem()
if @userid=@wksta + "$" or @userid="System"
$IsSystem=1
endif
endfunction
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 987 anonymous users online.
|
|
|