New
#1
Finding a program in Program Files (x86)
Running Windows 7 Pro, 64bit.
We have a package of scripts and programs that comprise a custom application for OpenOffice 3.2 (do not want to upgrade OO at this point). We must support our package on Win XP, Vista and 7.
A bunch of our scripts start up OpenOffice by running the command:
C:\Program Files\OpenOffice.org 3\program\soffice.exe (with arguments).
Works fine on XP. Fails on Win7 because the OO program installs itself into Program Files (x86). Even if I change properties of the installer file, in the Compatibility tab, to Win XP SP3, AND tell the installer to put it in C:\Program Files, Windows 7 still installs it into Program Files (x86).
We would LIKE to have the same script work on both flavors of Windows. I know we can modify our scripts to branch on which Windows, and choose two different paths to soffice.exe, but that's messy.
I can't solve it by creating a shortcut in Program Files, to the program in Program Files (x86); that's not allowed.
Is there some solution in Windows 7 to find the program no matter which place it lives? Like, a semi-intelligent environment variable for ProgramFiles that looks in one place, then the other? Ie.:
"C:\%ProgramFiles%\OpenOffice.org 3\program\soffice.exe
Maybe I'm missing some easy solution, but so far I don't see it.