V
V
Vitaly2016-03-29 10:51:42
cmd/bat
Vitaly, 2016-03-29 10:51:42

How to go to the desired disk and execute the bat file?

Hello!
I ran into this problem:
I have a bat file on my computer, on the C: / Windows drive, which starts the program with certain parameters.
If this file is moved to a USB flash drive or to some other disk, the program swears that it can only be launched from the C drive.
I tried to create another bat file on a flash drive in which, as it were, I go to the C: / Windows drive and then I run the necessary bat there.
Here is the contents of the run.bat file on the flash drive to go to the C: / Windows drive and execute my.bat

cd /cc:\Windows\my.bat

run.bat manages to run my.bat , but the program still complains. At the end of my.bat put pause and it is clear that the program does not start from under C

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dude2012, 2016-03-29
@Scorpiored88

c:
c:\Windows\my.bat
c: - switch to drive c
can be practiced by running cmd
Start-Run cmd
d: - switch to d.
c: jump to c

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question