Run batch file with custom drive mappings
Posted
by
mwolfe02
on Super User
See other posts from Super User
or by mwolfe02
Published on 2012-12-17T16:18:29Z
Indexed on
2012/12/17
17:05 UTC
Read the original article
Hit count: 254
I want to create a "mini virtual environment" to run a program. The only difference between my normal environment and the virtual one would be the drive mappings.
- I have an
X:
drive mapped to\\some\network\location
- I have a program
myapp.exe
that expects theX:
drive to be mapped toC:\local\path
- I need to keep my
X:
drive mapped to\\some\network\location
throughout the process
I would like to be able to run the following batch file and not have it affect the current environment:
subst X: C:\local\path
myapp.exe
© Super User or respective owner