I am trying to run a command like this from a CD under Vista. It works fine as a batch file under Vista and outputs the CD-ROM drive letter to a text file, as intended. It works fine as an exe and batch under 2000/XP.
ECHO %~dp0 > C:\file.txt
where file.txt will display D:\
However, after I convert it to an executable Vista will run the exe from a temp folder which gives the wrong path in file.txt. Is there a way to prevent this from happening?