Page 1 of 1 1
Topic Options
#127106 - 2004-09-27 09:07 PM @userID fails on windows 2003 mixed domain
Jstar Offline
Lurker

Registered: 2004-09-27
Posts: 3
I'm at a recently upgraded to windows 2003 site that previously had 126 (give or take) individual login BAT scripts for user logins. I'm attempting to replace these scripts with a single kix script. All has worked well so far, but it seems that @userid doesn't get processed correctly.

I've taken this portion completely out of my script and made a stand alone script for testing and get the same result on member workstations and the windows 2003 servers.

If I have script like:

If @userid ("Bobbyjoe")
Use K: "\\server1\share1$"
Use L: "\\server2\share2$"
EndIF
;
If @userid ("Billysue")
Use P: "\\server3\share3$"
Use Q: "\\server4\share4$"
EndIf

If I run the above as either BobbyJoe, or Billysue, the end result is that I have all 4 drives mapped to my session, as opposed to just the drives defined by @userid.

When running a test script with a /debug, I see ("bobbyjoe") repeated in the DOS window just after the
If @userid ("Bobbyjoe") statement is made.
(And of course, ("billysue") is displayed right after the next If statement.)


I'm using kixtart version 4.22, and I've used @userid many times before without error. I've searched over the forums and haven't found any others with this apparent issue. Is there something simple I'm missing here?

Thanks

J

Top
#127107 - 2004-09-27 09:21 PM Re: @userID fails on windows 2003 mixed domain
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
syntax is wrong

Code:

If @userid = "Bobbyjoe"
Use K: "\\server1\share1$"
Use L: "\\server2\share2$"
EndIF
;
If @userid = "Billysue"
Use P: "\\server3\share3$"
Use Q: "\\server4\share4$"
EndIf


_________________________
Eric

Top
#127108 - 2004-09-27 09:21 PM Re: @userID fails on windows 2003 mixed domain
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
@USERID is not a function, but a macro. So to correct your mistake, I'd go with...

Code:

If @userid = "Bobbyjoe"
Use K: "\\server1\share1$"
Use L: "\\server2\share2$"
EndIF
;
If @userid = "Billysue"
Use P: "\\server3\share3$"
Use Q: "\\server4\share4$"
EndIf


Top
#127109 - 2004-09-27 09:25 PM Re: @userID fails on windows 2003 mixed domain
Jstar Offline
Lurker

Registered: 2004-09-27
Posts: 3
Thanks for the update guys, that did the trick of course.

I was baseing my code off of previous working scripts for the older kix revs. Didn't realize the syntax had changed for this macro w/ 4.22, and looking up refrences on @userid didn't get me much as far as new examples.

thanks much for the quick response. Happy Monday

J

Top
#127110 - 2004-09-27 09:31 PM Re: @userID fails on windows 2003 mixed domain
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
what version were you basing it off of? i don't think that macro (or any macros) ever worked the way you had posted it.
_________________________
Eric

Top
#127111 - 2004-09-27 09:39 PM Re: @userID fails on windows 2003 mixed domain
Jstar Offline
Lurker

Registered: 2004-09-27
Posts: 3
I'll have to get back to you on the version info, but I'm darn sure that syntax has worked at other locations with previous verisons. If it didn't there would be upset users calling me. All scripts have been through multiple runs of the debugger too.

I'll doublecheck all the same however, and will post the kix version info that allows that syntax (if it works) when I can.

Thanks again,

J

Top
#127112 - 2004-09-28 01:34 AM Re: @userID fails on windows 2003 mixed domain
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
If you put the mapping info into an .INI file, you can use a generic drive mapping routine that only reads the appropriate mappings for the particular user. Additionally, you only need to edit the .INI file to add/remove users/mappings. See also the various MapDrive() UDFs.
_________________________
There are two types of vessels, submarines and targets.

Top
#127113 - 2004-09-28 02:13 AM Re: @userID fails on windows 2003 mixed domain
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

I'm darn sure that syntax has worked



That is not a testament of proper syntax but rather of the forgiving nature of KiX when poorly coded.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

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 857 anonymous users online.
Newest Members
JimDunn, fgarcia, Viginette, ManuvdWielNL, Sir_Barrington
17890 Registered Users

Generated in 0.057 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

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