Page 1 of 1 1
Topic Options
#110554 - 2003-12-18 04:01 AM Want to map drives based on userid
AlTaylor Offline
Fresh Scripter

Registered: 2003-12-08
Posts: 11
I want to use an IF statement to determine a user's USERID then 'map' a drive based on the USERID, any ideas? Her is the piece of code I have tride:

IF @USERID = "Student1"

USE H: "\\dellserver\students\Student1"

ENDIF

Please point me in the correct direction.

Al.

P.S. I am new to kixtart

Top
#110555 - 2003-12-18 04:17 AM Re: Want to map drives based on userid
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

At shorter way can be
Code:

IF (@userid = "Student1")
USE H: /delete /persistent
USE H: "\\dellserver\students\"+@userid
ENDIF


or when @userid is mapping the homedirectory which is always necessary
Code:

USE H: /delete /persistent
USE H: "\\dellserver\students\"+@userid


greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#110556 - 2003-12-18 05:24 AM Re: Want to map drives based on userid
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Beware that if any clients are older than Win2k, the deep mapping won't work.
_________________________
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 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.11 seconds in which 0.089 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