Finding installation directory with .bat file

April 19, 2010 at 03:27:35
Specs: Windows Vista
I want to write a batch file that finds "myapp.exe" on the customer's computer, then open that directory and run a fix. It's easy enough if they don't change the directory on installation, but some choose to change the directory and if they do that I can't simply run my fix on the directory it's supposed to be in. Any suggestions?

See More: Finding installation directory with .bat file

Report •

April 19, 2010 at 09:27:29
@echo off & setLocal EnableDELAYedeXpansion

for /f "tokens=* delims= " %%a in ('dir/b/s/a-d c:\excel.exe') do (
set D=%%~DPa
pushd "!D!"

Helping others achieve escape felicity


Report •
Related Solutions

Ask Question