Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: install script to detect 32 or 64 bit architecture  (Read 3545 times)

0 Members and 1 Guest are viewing this topic.

droog

  • Guest
install script to detect 32 or 64 bit architecture
« on: April 30, 2009, 03:45:25 PM »
Hi all:
I'm creating a batch script that I'd like to count on for installing a Help 2 system to both 32 and 64 bit architecture. I'm hoping to avoid an architecture conditional statement in the script. I'm installing to whateverdrive:\Program Files\Foo\Help2. For the 64 bit architecture I'll need to install to whateverdrive:\Program Files(x86)\Foo\Help2.
My thinking is that I can use the %ProgramFiles% variable to determine the architecture. For instance:
echo %ProgramFiles% on my PC will return C:\Program Files, whereas echo %ProgramFiles(x86)% echos my input, %ProgramFiles(x86)%. I don't have a 64 bit box to test on yet, will that variable return whateverdrive:\Program files(x86) on a 64 bit PC?
If so I want to make variable based on the echo return, which will act as an architecture indicator without having to actually specify hardware.
Am I out to lunch? Will I need an architecture condition?
Any help greatly appreciated
thanks