Windows

General discussion

Locked

Login script to map personal drive

By esrfalco ·
We run NT4 (moving to Win2k) servers with some NT4, Win2k, but mostly Win95 clients. I'm not a network guru, but those who are tell me that there is no way to write a generic login script that will automatically map a user's private share. They tellme a script can't read the user's machine name in Win95 (which is the same as their username), and place that in a variable to map to \\servername\<username>$ They tell me we'd need to hand-write a script for each user.

While I'm no MCSE, I find it hard to believe that this is impossible. Please prove me right.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

Login script to map personal drive

by NetworkMunchkin In reply to Login script to map perso ...

You are undeniably correct.
My recommendation is to use Kixtart. It's a script language that is VERY functional when it comes to login scripts. You can do virtually anything you want with it. It has macros that can determine username, pc name, group memberships, time of day, your mom's shoe size, and just about anything else you could possibly want to know about who is logging on, when, and where.
Even better yet... kixtart is just as simple to write in as regular NT batch file language.The manual has tons of examples for each command you can customize you your needs.
Regarding mapping a private share based on who is logging in... it's very simple.
It's a matter of setting up a basic "use" command to map the drive, and thenreplacing certain values in the UNC with macros that derive the userid that is logging in, and also the hostname of the PC they're on at the time if you really want. The machine name is irrelevant though since you'll want the user to get his privateshare even if they log into multiple machines.
All you really need is to already have standard naming convention for your private share names. Basically... each private share needs to match up to each username in some common fashion so that youcan isolate a specific section of the command line and make it into a variable.

ie. user: billybob share: \\server\billybob$

command-> use h: "\\server\" +@userid+ "$"
which translates to:
use h: "\\server\billybob$"

That makes one single command that will work for all users, based on determining their username during the login process.
It works.

Look into it. I guarantee you can make Kixtart work for you. Download Kixtart v3.63. It's free.

http://kixtart.org

(Also, no I'm not working for the kixtart people, and no I don't have any programming background at all. I honestly like it and have used it to make numerous complicated scripts.)

Collapse -

Login script to map personal drive

by NetworkMunchkin In reply to Login script to map perso ...

Oh ya...one other thing... Kixtart commands will function in all versions of Windows... 95, 98, NT, ME, and 2000, and whatever else they come out with.
Some of the more complicated stuff (ie. registry editing) has to be customized per OS, but simple mapping and such is all the same.

Collapse -

Login script to map personal drive

by NetworkMunchkin In reply to Login script to map perso ...

And if you have problems because the private shares dont happen to follow a standard formula... you can use "if" statements"
ie.
if @userid = "billybob"
use h: "\\server\billybob"
endif
if @userid = "john"
use h: "\\server\johnhome"
endif

All in one script......

Collapse -

Login script to map personal drive

by esrfalco In reply to Login script to map perso ...

Poster rated this answer

Collapse -

Login script to map personal drive

by esrfalco In reply to Login script to map perso ...

This question was closed by the author

Related Discussions

Related Forums