Archive: branching an Execwait??


branching an Execwait??
Hey folks.

Here's my problem. From my installer, I need to kick off an MSI install. So far as I've been able to tell, I actually need to call the msiexec from an Execwait in order for this to work. Nothing else seems to achieve the desired results. However, one problem. If the OS is '95 or '98 (and assuming they have the installer), I need to call it like this:

ExecWait '"msiexec.exe" $INSTDIR\SFRelease.msi'

However, if its NT, 2K or XP, I need this:
ExecWait '"msiexec.exe" /i $INSTDIR\SFRelease.msi'

The only way I've found to distinguish between those is to make a system call or something to do 'set OS', which should echo back the current version. Then I can do some sort of compare on that, and branch to a different Execwait depending on the result.

So my question is 2-fold. First, can anyone think of any easier way to accomplish the above? And whether you think of something new, or just agree with my above assessment, can someone please provide some code snippets for the nsi file? I'm still quite new to this, and bit lost on how to do branching.

Thanks very much for your time.

- Geo

Have a look at Examples\functions.htm (GetWindowsVersion)