Page 1 of 1 1
Topic Options
#183677 - 2007-12-14 06:03 PM runnas help
MikeMarten Offline
Fresh Scripter

Registered: 2007-12-06
Posts: 8
Ok I don' know if I am making this to hard or not. I am trying to run a script that needs AD administration rights at logon (doing away with roaming profiles) I am trying to use runnas but in my script I am calling @userid. Which turns out to be administrator (after runnas). How do I get the currently logged on user?


#183679 - 2007-12-14 06:30 PM Re: runnas help [Re: MikeMarten]
Shawn Administrator Offline

Registered: 1999-08-13
Posts: 8611
You running a Kix script under runnas ? Could you not just pass @USERID to the runnas command line that calls the script ? ex,

runnas ... script.kix $$userid=@userid ...

#183685 - 2007-12-15 02:06 AM Re: runnas help [Re: Shawn]
Björn Offline
Korg Regular

Registered: 2005-12-07
Posts: 950
Loc: Stockholm, Sweden.
I agree with Shawn. Since you're parsing the username after running @userid - you need to capture the 'current' before that.
as long as it works - why fix it?
If it doesn't work - kix-it!

Page 1 of 1 1

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

Who's Online
1 registered (Allen) and 37 anonymous users online.
Newest Members
FlyHorton, mschwj, Barchester, Evgeniy, kvanacker
17498 Registered Users

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

Search the board with:
superb Board Search
or try with google: