1.

Solve : network bat question?

Answer»

I've been writing a bat FILE that maps a network drive after I log into a VPN network.  However, I've RUN into a snag and can't figure it out.  I execute the file, but it then asks me for my credentials, which I type in.  No luck.  However, when I use the windows shortcut WINDOWS-R, then type in the path to the prompt, it works.  The question why won't it work in DOS, but work in Windows?Please post the code you are using and if possible give us the errors that are coming up. The more information you give us, the better we can tailor the help to your specific problem.net use V: /delete
net use V: "\\server\folder\folder\folder"

%SystemRoot%\explorer.exe "\\server\folder\folder\folder"

it asks me for my ID and password, which I put in:

server\username
password

then it tries again, and eventually tells me I don't exist.First, are you CERTAIN that you have permissions to the folder you are mapping. One way to see what is happening is to make sure echo is on (echo on at the beginning of the batch) and then put > %userprofile%\desktop\log.txt at the end of each line then your desktop should get the log file that has everything that happens until you run into the problem.

You can also open a cmd prompt and type in the commands one by one until you find which one sparks the problem. You should see a "The command completed successfully" or "The network connection could not be found" for the first command. The second one will either give you ANOTHER, "The command completed successfully" or "The password is invalid for \\server\folder\folder\folder.

Enter the username for 'server': "
If the second one is popping up, then it means you don't have permissions to that folder. If you do in fact have permissions, then it may be due to the cmd prompt not recognizing the VPN connection. You can try to map the drive to a folder up or down a level and see if you have better luck. If you aren't able to access it at all, then it is the connection, or the cmd prompt not recognizing the connection. I'm not sure how to fix that, honestly. Your commands look fine otherwise.



Discussion

No Comment Found