|
Answer» Hi I would just like you guys you do an amazing job on these forum. This is my first time at looking at building a batch file or anything like it, my project is building a uninstaller for my FS2004 graphics upgrade program which is about 95% OVERWRITES, hence the need for a backup which my inno installer creates. My PROBLEM now is getting a batch file to find the main flightsim directory path on the users PC as this can be anywhere not just on C:\ default reg path is [ HKLM\Software\Microsoft\Microsoft Games\FLIGHT Simulator 9 ] and the .exe file name is [ FS9.exe ] I have trawled the net for a month looking and tried all the answers before giving up and asking. It needs to be XP and later including 64bit
Thanks Howard
you can use the REG /QUERY cmd to EXTRACT the path from that registry key.Thanks for getting back to me I was sure REG QUERY was the right one but cant find the right code after it to locate the path, all I get is failed REG/? FS9.exe /s cmd or REG/? HKLM\Software\Microsoft\Microsoft Games\Flight Simulator 9\ FS9.exe /s My flightsim is not in the default install location been trying different things for a month now, but I don't fully understand batch files programming Here is an example: It will only show the keys containing flight, and then you can use another query to examine the values - if the key is present
REG QUERY "HKLM\SOFTWARE\MICROSOFT\MICROSOFT GAMES"|find /i "flight"Thank for the input, but still not there yet the code tells me the Synex is wrong I manage to move it on to "invalid key name" "cannot open" "cannot find" thought this looked easy
my string from regedit is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft Games\Flight Simulator\9.0 EXE PATH
and it still never finds it
Q/ what is "Wow6432Node" ?
help
|