![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih92dXinkRG1nc5eL_yagt9H0hyphenhyphenrwPw_G9wocULqxiwyXt71fsOaCMgmMsnG-pZW8JS7Jaa0fh6e60HFfZ8yElMm_0bGAGmpArqFZRkj3hAQsT9SFoVcvdpKqwY0WdKyhXFi6LT3njWW0/s800/VistaLogo80x80.png)
The command to handle that is "net use..." with different options. A description of the command can be found on Microsoft website: Net use .
The two batch files can do the job:
- User1.bat has the following lines:
net use * /delete /yes
net use x: \\NetServerName\SharedFolder *
/user:NetServerName\User1 - User2.bat :
net use * /delete /yes
net use y: \\NetServerName\SharedFolder *
/user:NetServerName\User2
net use * /delete /yes
" in the both files deletes all existing connections. The key "/yes" is not documented in the official Microsoft description, but it works as a default response to the command prompt question [Y/N].The second command sets up new mapping to the specified shared folder from the specified user. An asterisk (*) at the password key position makes the command ask for the password.
I put shortcuts to the batch files on the desktop and switching between these shared folders became trivial.
0 comments:
Post a Comment