want2becoder Posted May 24, 2011 Share Posted May 24, 2011 (edited) 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. Suggestions? 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!") Exit(1603) EndSwitch Edited May 24, 2011 by want2becoder Link to comment Share on other sites More sharing options...
wakillon Posted May 25, 2011 Share Posted May 25, 2011 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:X86So i can't install a Setup x64.msi... AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now