We are using DiFx based installer tools for driver installation.
However the DiFx command line tool from the DDK provides separate binaries for 32 and 64 bit.
So based on the OS (Xp or 7) and its architecture (32 or 64 bit), we are calling corresponding DiFx command line binaries.
The script used to identify OS and architecture are working smoothly on XP/7 32/64 untill we came across Win7-64 PC (having i7 processor) here we are not able to detect the architecture (32 or 64), we are using below script commands to detect OS and acrhitecture
OS:
“wmic OS Get Version”
if output contains “6.1.7600” it is Win-7 (here we are not sure its a 32 or 64 OS, we will get during 2nd script)
if output contains “5.2.3790” it is Win Xp-64
Architecture:
“wmic OS Get OSArchitecture”
if output contains “64-bit”, it is it is Win 7 64
else Win 7 32
Appreciate, if there is better way of determining the OS and its architecture from the command line, please share.
From: “xxxxx@gmail.com” To: Windows System Software Devs Interest List Sent: Tuesday, June 28, 2011 8:03 AM Subject: [ntdev] DiFx for Windows 32/64
We are using DiFx based installer tools for driver installation.
However the DiFx command line tool from the DDK provides separate binaries for 32 and 64 bit. So based on the OS (Xp or 7) and its architecture (32 or 64 bit), we are calling corresponding DiFx command line binaries.
The script used to identify OS and architecture are working smoothly on XP/7 32/64 untill we came across Win7-64 PC (having i7 processor) here we are not able to detect the architecture (32 or 64), we are using below script commands to detect OS and acrhitecture
1. OS: “wmic OS Get Version” if output contains “6.1.7600” it is Win-7 (here we are not sure its a 32 or 64 OS, we will get during 2nd script) if output contains “5.2.3790” it is Win Xp-64
2. Architecture: “wmic OS Get OSArchitecture” if output contains “64-bit”, it is it is Win 7 64 else Win 7 32
Appreciate, if there is better way of determining the OS and its architecture from the command line, please share.
As the name suggests PROCESSOR_ARCHITECTURE
If we install a 32 bit Windows7 OS on the 64 architecture PC (Ex. AMD Athlon 64), we wanted to know the value of this env variable. Will it be x86 or x64.
I could have tested the same, but I dont have such environment with me know.
As the name suggests PROCESSOR_ARCHITECTURE
If we install a 32 bit Windows7 OS on the 64 architecture PC (Ex. AMD Athlon 64), we wanted to know the value of this env variable. Will it be x86 or x64.
If you install a 32-bit operating system, then it thinks it is running
on a 32-bit processor. The variable will be x86.
I uses an NSIS installer and invoke DPInst from inside it. The NSIS
installer is a 32-bit application, which adds another level of
complication. I use the presence or absence of the SysWOW64 directory
to decide whether I’m running on a 64-bit system or not.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.