Friday, May 17, 2013

Application path for a DOS app

Some of the DOS based applications need MS Office path to execute that application properly. If the developers hardcoded MS Office path in the DOS application for a specific OS or MS Office version, it will fail when the DOS application used in different platform or newer application.

For example “ example.exe” is  a DOS application and designed to use with MS Office 2007 Access. The developers have hardcoded the MS Office Access 2007 path as a ‘Program Path’. Now when we use the DOS application with MS Access 2010 it will give you an error similar to the “Path not found for Access”. The reason for this is the path is different for MS Access 2010 then 2007. It is similar if you are using 32 vs 64 bit OS.

The DOS program path for MS 2007 Access is: c:\progra~1\micros~2\office12\Access.exe
But how can we find the program path for Office 2010?
One way is to find with the command prompt:
On Command prompt Type cd\Progra~1






Then

Dir Micros*/x


That will give you list of installed Microsoft applications and other applications as well. From there we can browse and find the application path that needed.
However, how can we search for Windows 7 x 64 bits? To answer this we need to use Progra~2

Rather going through this lengthy process, we can find all the installed application paths using by following key: (Simple and easy… huhhh)
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths]
Under this key, we will get the Program paths for all the installed applications.
The Program path for MS Access 2010 on windows 7 64 bit Operating system is :
C:\PROGRA~2\MICROS~1\Office14\MSACCESS.EXE

No comments:

Post a Comment