Jump to content
Sign in to follow this  

X86 and X64 on Win7

Recommended Posts


Initial had to differeniate between XP and Win 7 but now it seems some of the machine are win7 32bit.

Some reason a script using the @OSArch is failing on Win 732bit but works great on Win 7 64bit.

I did see there is the @CPUArch varible I can use but don't know if it will met my requirments.


Local $OSVersion = @OSVersion ;Returns one of the following: "WIN_2008R2", "WIN_7", "WIN_2008", "WIN_VISTA", "WIN_2003", "WIN_XP", "WIN_XPe", "WIN_2000".

Local $OSArch = @OSArch ;Returns one of the following: "X86", "IA64", "X64" - this is the architecture type of the currently running operating system.

Local $CPUArch= @CPUArch;

Local $NetworkInstallerFullPath, $InstallerMSIFileName

Switch @CPUArch

Case "X64"

$InstallerMSIFileName = "Setup x64.msi"

$NetworkInstallerFullPath = @ScriptDir & "\" & $InstallerMSIFileName

Case "X86"

$InstallerMSIFileName = "Setup.msi"

$NetworkInstallerFullPath = @ScriptDir & "\" & $InstallerMSIFileName

Case Else

MsgBox(0, "Error has occured!", "Processor " & $CPUARCH & " type isn't supported!")



Edited by want2becoder

Share this post

Link to post
Share on other sites

You must switch between @OSArch for determine which file install.

In my case, i'm on :

OS:WIN_XP/Service Pack 3 CPU:X64 OS:X86

So i can't install a Setup x64.msi...Posted Image

AutoIt X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.