Re: Net use command to map network drive

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"longacre10" <longacre10@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:AA7156B4-E6A9-437E-B8FA-5FE7BB0F0606@xxxxxxxxxxxxxxxx
Good morning,

I was hoping someone could help out with an issue I'm having. I am trying
to create a batch file that will map a Windows Server drive and save the
username/password credentials (after a reboot). I also want it to map the
drive without prompting the user for the credentials.

Currently I am using the following:
net use R: \\192.168.2.25\WindowsServer /savecred /persistent:yes

This will map the drive fine and keep it mapped after a reboot but it
prompts the user for the credentials which I don't like. I originally tried
the following and it mapped fine and automatically inputted the credentials
which we're looking for but would not save them after a reboot:
net use R: \\192.168.2.25\WindowsServer /user:username password
/persistent:yes

Does anyone have any ideas? Even if I have to use multiple commands for the
batch file it would be an option. I was hoping to user the /savecred switch
with the /user switch but that apparently is not allowed. I am currently
using an XP machine to do this. Thanks!

I couldn't find a way to do this either for one of my clients, so we wrote Autoshares Network Connection Manager
http://www.wieser-software.com/autoshares/
which saves the user credentials (encrypted) in the user's registry, and reconnects at login.

Anthony Wieser
Wieser Software Ltd

.



Relevant Pages

  • Re: Net use command to map network drive
    ... I am trying to create a batch file that will map a Windows Server drive and save the username/password credentials (after a reboot). ...
    (microsoft.public.win32.programmer.networks)
  • Net use command to map network drive
    ... I also want it to map the ... drive without prompting the user for the credentials. ... This will map the drive fine and keep it mapped after a reboot but it ... batch file it would be an option. ...
    (microsoft.public.win32.programmer.networks)
  • Re: Access Permissions
    ... In order to map the drive...they had to supply credentials, user name and password, correct? ... for that period during which they are powered up...they've entered credentials which allow them to browse ... user is able to browse any shared folder in addition to the one that was ... network places, the shared folders are still visible. ...
    (microsoft.public.windows.server.sbs)
  • Re: Copying from Novel
    ... My Novell days were way before VB but If I remember correctly from DOS we could reference files with something like sys:\\directory1\file.txt instead of having a drive letter reference it. ... The batch file would map a drive, launch the program then delete the drive map. ... If you can't create the map from w/in VB then use a batch file to launch the program and make your icon in windows run the batch file. ... Finally maybe someone more experienced in using .net in a Novell environment can provide a better solution. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Beginner needs help with text files
    ... I had the data from the bsplist.txt going to a textbox. ... The batch file needs to be put in the directory its going to search from. ... I admin a bunch of gaming servers. ... Each server uses a map rotation file to cycle through the maps. ...
    (microsoft.public.vb.general.discussion)