Jump to content

Login script doesn't work


dennis99
 Share

Recommended Posts

I change a line in logon script from:

net use m: \\server1\sharea

to:

net use m: \\server2\shareb

and it has no effect. I still have the old drive mapping.

I made sure logon scripts are updated on all domain controllers. Do I have to remove the old drive map by hand? Is there a switch I can use to replace the old drive map? thx

Link to comment
Share on other sites

http://www.windowsnetworking.com/kbase/Win...cksandTips.html

TRICK #3 - Mapping drives

Most Windows NT shops have some directories on the server that are shared out. Windows 9x and NT allow you to assign a drive letter in windows explorer to these shared resources so you can see them over the network just as if you were using that drive on your own computer. Usually you use windows explorer and the tools menu to map a drive and map it permanently, but users always accidently disconnect them, and in addition, you may want to force users to use a specific drive letter for a specific share (for instance, you may want to force them to use the U: drive for a 'users' share ona server, etc.

In your login script, map drives using these commands:

net use U: \\MY_SERVER\users

net use P: \\MY_other_server\public

echo U: drive mapped to the users share

echo P: drive mapped to the public share on My_other_server

You get the point. Here is some info though, when you run the net use command in win 9x, the default behavior is to create a non-persistant share, meaning that if you reboot the machine, the shares will disappear and will not come back until you run the login script again. No problem there. The problem is that in win NT, the default behavior is to create persistant shares, so you run the login script and make the shares, and then you run it next time you log in and you get errors telling you that it is already mapped. The solution is to leave the win95 portion of the script as I show above, but in the win nt portion of the script do this:

net use U: /del

net use P: /del

net use U: \\MY_SERVER\users

net use P: \\MY_other_server\public

So as you can see we get around the problem by deleting the share first and then mapping it - we are still left with the problem that the very first time the user logs in they won't have the shares to delete, but I am not that picky....

Another note, if you want your net use statements not to show up, precede them with a '@', example:

@net use M: \\server\mp3

From this, you may have to use the "net use m: /del" command, and the add the new net use command. It may also be an idea to login with no net use command, then add the new net use command for the next login.

You can also find help on the net use command, here

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy