Believe it or not, my installer is so old that it has no way to detect the 64-bit version of Windows.
Is there a call to the Windows DLL or (even better) an environment variable that will provide this information for Windows XP and Windows Vista?
One possible solution
I see that Wikipedia states that the 64-bit version of Windows XP and Windows Vista has a unique environment variable: %ProgramW6432% , so I assume that it will be empty on 32-bit Windows.
This variable points to the Program Files directory, which stores the entire installed Windows program and others. By default, English systems use C:\Program Files . On 64-bit versions of Windows (XP, 2003, Vista) there is also %ProgramFiles(x86)% , which is C:\Program Files (x86) by default and %ProgramW6432% , which is C:\Program Files by default. %ProgramFiles% depends on whether the process requesting the environment variable is 32-bit or 64-bit itself (this is caused by 64-bit Windows-on-Windows redirection).
windows 64bit batch-file
Clay Nichols Mar 02 '09 at 2:33 2009-03-02 02:33
source share