#159538 - 2006-03-21 01:19 PM
How can I check the Domain name? Cached Credentials problem...
|
Mo2
Fresh Scripter
Registered: 2004-06-08
Posts: 7
|
Hi,
I'ld like to be able to ensure the current user / workstation is logged in the domain in the beginning of a script file... This is a script that is ran independent of the logon process, but should run only when the user is logged on.
I have tried @LDOMAIN, @LSERVER and %LOGONSERVER%. However, all of them show cached values on my windows XP, even when I'm logged in locally!
Is there a way to tell if the user / workstation is actually on the network?
I figured out I could use If Exist ("\\uncshare") as a workaround ("uncshare" is a share I know to exist on the domain). The problem is that there is a 2-3 second delay for this to compete, when the user is not on the network, and it might not be a good solution for use with many users, due to possible access issues to the shares...
What would you suggest?
Thanks
|
|
Top
|
|
|
|
#159539 - 2006-03-21 02:25 PM
Re: How can I check the Domain name? Cached Credentials problem...
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
My experience has been that @Lserver would be equal to "\\"+@wksta when logged on with cached credentials.
|
|
Top
|
|
|
|
#159541 - 2006-03-21 07:16 PM
Re: How can I check the Domain name? Cached Credentials problem...
|
Mo2
Fresh Scripter
Registered: 2004-06-08
Posts: 7
|
Quote:
My experience has been that @Lserver would be equal to "\\"+@wksta when logged on with cached credentials.
Hi, Unfortunately on a couple of machines that I tested, it returns what should be cached logon server information. The value does not change for @LServer when I try it while logged in the domain or in stand alone mode.
|
|
Top
|
|
|
|
#159542 - 2006-03-21 07:23 PM
Re: How can I check the Domain name? Cached Credentials problem...
|
Mo2
Fresh Scripter
Registered: 2004-06-08
Posts: 7
|
Quote:
How is the script called? Logon scripts generally don't fire if logging in with cached creds.
@LogonMode If 1, indicates that KiXtart assumes to be running during the logon sequence
Thank you. This is a script that users can run on demand or can schedule to run at a specific time. It relies on some files that are staged on a shared UNC. Naturally, if the user is not on the domain and does not have access to the UNC, I would like this script to exit gracefully, so that users do not encounter any errors...
Edited by Mo2 (2006-03-21 07:23 PM)
|
|
Top
|
|
|
|
#159543 - 2006-03-21 07:44 PM
Re: How can I check the Domain name? Cached Credentials problem...
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Define stand alone mode. did you have the network cable unplugged?
|
|
Top
|
|
|
|
#159544 - 2006-03-21 07:46 PM
Re: How can I check the Domain name? Cached Credentials problem...
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
you could ping the server, use EXIST() to see if the directory exists, or a number of other similar actions to help determine what your script should do.
|
|
Top
|
|
|
|
#159545 - 2006-03-21 07:50 PM
Re: How can I check the Domain name? Cached Credentials problem...
|
Mo2
Fresh Scripter
Registered: 2004-06-08
Posts: 7
|
Quote:
Define stand alone mode. did you have the network cable unplugged?
No, actually, I was at home, trying to have the "user" experience. I was connected to my high speed provider and logged in to my PC, which used cached credentials and logged me in... However, I am not connected to any domains and have not established a VPN connection.
|
|
Top
|
|
|
|
#159546 - 2006-03-21 07:53 PM
Re: How can I check the Domain name? Cached Credentials problem...
|
Mo2
Fresh Scripter
Registered: 2004-06-08
Posts: 7
|
Quote:
you could ping the server, use EXIST() to see if the directory exists, or a number of other similar actions to help determine what your script should do.
Yes, Exists() definitely works. The drawback is that, if the user is not on the domain, the scripts pauses for a few seconds, until there is a timeout. How does the ping work?
Thanks
|
|
Top
|
|
|
|
#159547 - 2006-03-21 07:59 PM
Re: How can I check the Domain name? Cached Credentials problem...
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 302 anonymous users online.
|
|
|