Question

I'm attempting to generate a shortcut that will run an executable file called WAVistaWin7.exe. Whenever the shortcut generates, I'll double-click it, and it will say "WAVistaWin7.exe cannot find 'wa.exe'." wa.exe is inside of the folder that it belongs. I then attempt to put a Batch file called run.bat containing two lines:

@echo off
WAVistaWin7.exe

I redirect the shorcut to run this file, and the Batch file states that it cannot find WAVistaWin7.exe. It's becoming evident that the shortcut is running independently of the file. Note that whenever I run either WAVistaWin7.exe or run.bat inside of the folder directly it works. How can I get the shortcut to run as the file?

the result.

Was it helpful?

Solution

It looks like you need to set your working directory. In the shortcut properties, you can set the "Start in" folder.

Alternatively, in your batch file you can change to the appropriate folder:

@echo off
pushd C:\Program Files\WA
WAVistWin7.exe
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top