Registry key to find installation directory
Posted: 13 Mar 2013 06:35
H all,
I'm looking for a way to find (and run) a program that can be installed anywhere on the PC.
I've found some code that lists all the installed programs on the PC, from this, is there a way to extract the "InstallLocation" of a specific program then run the *.exe?
Here's what I'm using to compile a list of installed programs:
I'm looking for a way to find (and run) a program that can be installed anywhere on the PC.
I've found some code that lists all the installed programs on the PC, from this, is there a way to extract the "InstallLocation" of a specific program then run the *.exe?
Here's what I'm using to compile a list of installed programs:
Code: Select all
@echo off
If Exist c:\installedprogs.txt Del c:\installedprogs.txt
regedit /e c:\regexport.txt "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall"
find "DisplayName" c:\regexport.txt >c:\regprogs.txt
for /f "tokens=2 delims==" %%a in (c:\regprogs.txt) do echo %%~a >>c:\installedprogs.txt
del c:\regexport.txt
del c:\regprogs.txt
exit