Drive mapping scripts

Associate
Joined
28 Sep 2005
Posts
1,282
Location
London
I have got the basic "net use U: /del" "net use U: \\server\share"

BUT that tries to map the drive using the current user name and password. I need to use another username and password, this is just a click in windows, but unfortunately i have very many of these to do and would prefer to script it.

Is it "NET USER *username* *Password*" i use for this??



Many thanks in advance.
 
the script is stored on a server in domain environment. So it's not easy to get to, and it's only temporary until we go server 2003 on that domain.
It's only a minor server churning out pathology result lookups to an application. The data itself has to be read using the client side software which is tightly licenced.
 
Last edited:
it's not in the netlogon share, nor is it connecting to a domain controller. It's in a mapped network drive to a share the server, it's executed in startup. It's not set like a logon script in the netlogon share. If logon scripts worked between XP and NT server i wouldn't have the problem.
 
M0KUJ1N said:
Maybe a more efficient way of doing it would be to get the "minor server" to use the domain for authentication and give the users access to it? Would mean that you could just use existing credentials to map the drive.

That wouldn't work. Primarily because the minor server is servicing most of it's users under a netware environment (on a different site to this windows domain on server NT) and the server itself is Server2003 thus is in a workgroup as far as it is concerned. It will be encorporated into Active directory when the major netware to server 2003 migration happens later this year involving all 20+ servers across the group. This is why we don't really want to be messing around with domains at this point. The server NT system will be migrating to server 2003 next friday, and the 2003 logon scripts work fine with XP and can map the drive. The main issue being that XP sees NT logon scripts as inferior in security and won't execute them other than mapping the home directory. as of next weekend it won't be an issue, which is why i'm not taking servers down and adding them to domains for the sake of a week.
 
Otacon said:
^^ What he said... A batch script, a kix script... whatever, it's still a collection of Win32 commands, and XP should execute it regardless. I've never had any trouble, and I work in all sorts of wierd and wonderful domain environments.

I move all my scripting to Visual Basic these days, but that's another story.

Well for some reason ServerNT logon scripts don't execute on XP Pro Clients. Or at least not with static profiles. It mapped 3 drives, and ignored all the others. Worked fine on NT but not XP. All users have a logon script assigned still and nothing happens. But as has been said many times, once the new server 2003 box goes live next friday it'll all be done properly.

Edit: i originally tried doing a .VBS but my VB is a little rusty. Dim this, Things.Stuff
.bat was the one i could remeber the commands for.
 
Last edited:
Back
Top Bottom