views:

43

answers:

1

I want to be able to predict the default install location of an application. On a 64 bit machine, if it is a 32bit application, it would install in "Program Files (x86)" and if it were a 64bit application, it would install in "Program Files".

My goal is to install the application with its default location and validate if the install was fine. But for this I need to know where it would be installed. If I know what architecture the application is built for, I think it would serve my purpose.

+1  A: 

Download file for Windows to check the details of any file on Windows:

http://gnuwin32.sourceforge.net/packages/file.htm

Then, via the Windows command line:

C:\> "C:\Program Files\GnuWin32\bin\file" name-of-file.exe
name-of-file.exe executable for MS Windows (GUI) Intel 80386 32-bit

You should be able to grab the return value of this command from whatever development platform your working with.

pygorex1
Thanks. But for a microsoft installer package (.msi) that I use for installation, it does not return anything except -- "Microsoft Office Document".
Poulo