Batch file conundrum

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

sprinke

Thread Starter
Joined
Dec 30, 2010
Messages
2
Hello all. I am trying to write a very simple batch file that launches a program. I am very much a novice at this but I'm able to piece things together from information online.

My script so far is simple:

Code:
@echo off

start "C:\Program Files\blah directory\blah.exe"
Now here's where it gets tricky. The program in question is designed to run only when the CD is in the drive. I made an .iso copy of the CD and mounted the iso using Virtual CloneDrive. No problems there. When I double-click on blah.exe from Windows Explorer, the program launches just fine. BUT, when I run my batch file, it complains about the CD not being in the drive.

Shouldn't they be doing the exact same thing? Why does clicking to run the program work, while the batch file fail? Is there something I can do with environment variables that might help?
 
Joined
Dec 31, 2010
Messages
232
tell the batch file to open the iso (if it can ) insted of the CD , or have the iso mounted then have the batch file run the Blah.exe from the Iso.
 
Joined
Jul 29, 2001
Messages
21,334
Maybe the batch is not running because of the security context. I am not sure batch files run by default in WIndows 7 without running as admin.
 
Joined
Jun 7, 2010
Messages
36
I had the same problem and i sorted it out by making a shortcut to an easier destination for instance:

@echo off
start c:\blah\blah.ink

and that worked fine
 

sprinke

Thread Starter
Joined
Dec 30, 2010
Messages
2
I found that if I used a slightly different syntax, it worked just fine:

Code:
start /d "C:\Program Files\blah directory\" blah.exe
I guess maybe it needed to be inside the directory before trying to run the exe?

Thanks everyone who tried to help.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top