Sign in to follow this  
Followers 0
Luigi

about generic installer programs

2 posts in this topic

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

Share this post


Link to post
Share on other sites



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

√-1 2^3 ∑ π, and it was delicious!

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  
Followers 0