Program Locations
Posted: June 29th, 2011, 12:58 pm
In the menu system that we use, we usually have the directory name of where CSPro is stored hard coded into the application, e.g.
CSPro = "C:\Program Files\CSPro 4.0"; { CSPro directory }
With Windows 7 the directory is often “Program Files (x86)”, and if you have data entry set up with a mix of Windows 7 and earlier machines then you need two different set ups. I can program around this with FileExists to see where CSPro is stored, but I wondered if there is a simpler way of getting the path for a particular executable.
While CSPro would be the priority, I also launch Word and Excel from my CSPro menu from time to time, so something that would work for those too would be useful. If there is no simple solution, I will just go back to my method using FileExists.
CSPro = "C:\Program Files\CSPro 4.0"; { CSPro directory }
With Windows 7 the directory is often “Program Files (x86)”, and if you have data entry set up with a mix of Windows 7 and earlier machines then you need two different set ups. I can program around this with FileExists to see where CSPro is stored, but I wondered if there is a simpler way of getting the path for a particular executable.
While CSPro would be the priority, I also launch Word and Excel from my CSPro menu from time to time, so something that would work for those too would be useful. If there is no simple solution, I will just go back to my method using FileExists.