Page 1 of 1 1
Topic Options
#13888 - 2001-11-03 02:32 PM Mapping network drive in W2K
TVTS Offline
Lurker

Registered: 2001-11-03
Posts: 1
Hi, as part of our logon script (currently running on NT4) we have a personal drive mapped for each user of the path \\personalsrv\%username%
In NT4 this works perfectly and maps the users directory on the share (so if the user is JBloggs it maps \\personalsrv\JBloggs\ ). Problem is if we use this script with Windows 2000 it will not map. It seems W2K will not recognise the %username% variable at the drive mapping stage. If I go to the run bar and type \\personalsrv\%username% it will go to the drive but even if I try to manually map the network drive as \\personalsrv\%username% it fails. Any ideas why? Is there a different variable assignment I can use that will allow the drive to map in both 2K and NT4?

Top
#13889 - 2001-11-04 03:20 PM Re: Mapping network drive in W2K
Gennady Oster Offline
Lurker

Registered: 2001-11-04
Posts: 2
Hi!
What about macro @USERID ?
In my script, working about 5 years (on w2k too) I'm using the following:

;Variable section
$homesrv="MyServer"
$homedrv="u"
: ......

; Drive mapping
$resource="\\$homesrv\@USERID$"
$drive="$drvhome:"
use $drive $resource

I prefer hidden user shares to avoid paging the hundreds of directory names.

Hope, it helps.

Regards,
Gennady

Top
#13890 - 2001-11-04 09:12 PM Re: Mapping network drive in W2K
MCA Offline
KiX Supporter
*****

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

Welcome to the board.

You can use the kixtart macro @userid, which is an equivalent of %username%.
Sometimes it can be necessary to get your information from the registry. Not all windows
version will return the actual username by using the @userid macro.
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
#13891 - 2001-11-05 04:51 PM Re: Mapping network drive in W2K
Gennady Oster Offline
Lurker

Registered: 2001-11-04
Posts: 2
Hi!

Agree on 100%, but question was about W2K only.

Thanks for greeting. I didn't visit Kix sites for some years and was very surprised of it's evolution. I'd say even revolution .

Regards,
Gennady

Top
#13892 - 2001-11-06 03:25 AM Re: Mapping network drive in W2K
MCA Offline
KiX Supporter
*****

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

There are many kixtart boards on the internet but this one has become
one of the best.
Number of members is growing each day.
The topics contain different kind of information. Very general one's but
also very heavy stuff. Stuff which we think 'wasn't possible with kixtart'.
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
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 884 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.053 seconds in which 0.024 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