Re: help on login script
- From: "Lanwench [MVP - Exchange]" <lanwench@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 19 Sep 2007 12:34:17 -0400
SG <sguo@xxxxxxxxxxxxxxxx> wrote:
Hi,
Our DC is windows 2003 sp1, 90% of clients are windows XP pro. I'm
changing my login script in dos batch file to acheive this:
If login name is "frank", then run "net use y: \\server\folder".
My script is:
if %username%==frank goto dist_special
dist_specialnet use y: \\server\folder
end
It works for any user even the login is not frank. I don't follow
this. Can anyone help me please?
Thanks in advance,
Sarah
Well, a couple of things. If you want the goto thingy to work, you have to
preface it with a colon -
----------------------
if blah goto whatever
:whatever
some other command
----------------------
If that's just a typo, perhaps you haven't included enough of the login
script for us to know what happens if someone's username is not Frank. I
suppose you could insert
exit
right after the if ...
but you could also try
if %username%==frank net use y: \\server\folder /persistent:no
or use IFMEMBER from the resource kit, so you can do all this with AD groups
and not muck around with individual user accounts?
.
- Follow-Ups:
- Re: help on login script
- From: SG
- Re: help on login script
- References:
- help on login script
- From: SG
- help on login script
- Prev by Date: Re: Share certificate services between two domains
- Next by Date: Kerberos not working across domains
- Previous by thread: help on login script
- Next by thread: Re: help on login script
- Index(es):
Relevant Pages
|