Luigi Posted February 3, 2015 Share Posted February 3, 2015 Hi forum, I build (another) script to make an install package and need a doubt: The variables @OSVersion and @OSArch are enough to identify a operational system? How? Yes... If I need install some files in Windows XP 32bits, what I need from AutoIt is only @OSVersion and @OSArch. I belive yes. In this little example have a JSON piece, to show it... { "system" : { "WIN_XP" : { "X86" : "do_install_1", "X64" : "do_install_2" }, "WIN_7" : { "X86" : "do_install_3", "X64" : "do_install_4" } } } So, this variables are suficient to cover up all operation system? What you say? Have more? Br, Detefon Visit my repository Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 3, 2015 Moderators Share Posted February 3, 2015 I typically use something like this for installs (pseudo, as I'm not on my main machine, but should give you the idea). I do a lot, on many different OS versions, and haven't had an issue: Switch @OSVersion Case "WIN_81" ShellExecute("msiexec.exe", (@OSArch = "X86") ? "/i 'x86.msi' /qb" : "/i 'x64.msi' /qb") Case "WIN_8" ShellExecute("msiexec.exe", (@OSArch = "X86") ? "/i 'x86.msi' /qb" : "/i 'x64.msi' /qb") Case "WIN_7" ShellExecute("msiexec.exe", (@OSArch = "X86") ? "/i 'x86.msi' /qb" : "/i 'x64.msi' /qb") ;etc., etc. EndSwitch "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! 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