i need a batch file to map drive onto VM

February 3, 2011 at 00:57:47
Specs: Windows 7, 3GB
Hi... I was asked to create a batchfile to map a drive from my computer onto my VM

the batchfile i used is:

@echo off
net use X: \\my VM's IP address\sharename
pause

It worked. When this batchfile is run, a new drive "X" is mapped onto my VM.

Now, I am asked to create a generalized batchfile which when run, asks the user for his VM's IP address and once he types in his IP, a drive "X" is mapped onto the IP he feeds. I am not understand what variable to declare and how to declare it! Please help me out.

So far all i have got is,

@echo off
set /p =enter your IP address:
net use X: \\%enter your IP address%\sharename
net use /user:username/passwordassword
pause.

This has been pending for quite some time now. Please help me out here.


See More: i need a batch file to map drive onto VM

Report •

#1
February 3, 2011 at 13:45:22
You will get more help with programming here: http://www.computing.net/forum/prog...

Report •
Related Solutions


Ask Question