cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
lonewolf32
Flexera beginner

Test for 64-bit OS before prerequisites install [InstallScript]

I am writing an InstallScript build, and trying to utilize the built-in prerequisites feature. The problem as you all know is that the prerequisites install themselves before any custom code can be run (even before OnBegin - I just think this is horrible... but here we are.) I would like to check that I am on a 64-bit OS before my prereqs install. This is because my build is 64-bit only. But not all my prereqs are 64-bit only, so what happens is that some of the prereqs install, then we get to the main code and I tell them "sorry - 64 bit only" so it ends up wasting time and installing things they don't need/cannot use.

I cannot (more accurately do not want to) put conditions on the prereqs themselves because things like .NET 4.5.1 prereq are meant to install to either 32- or 64-bit Windows.

I am left with the idea of creating my own prereq, that runs before all the others, to check for 64-bit OS, and then fail the installation if this check fails.

Has anyone done this? If so, how did you do it? I suppose I could create a custom executable in C# that checks this and returns a return code. However it just seems there ought to be an easier way, perhaps using built-in features of the prereq editor?

I might just go back to not using the prereq editor and running these installs myself. Seems more straightforward.

Thanks.
Dave.
Labels (1)
Tags (1)
0 Kudos
1 Reply
chad_petersen
Occasional contributor

Re: Test for 64-bit OS before prerequisites install [InstallScript]

I always use MSI these days - you can still call Installscript all you want - but you get all the goodness of MSI for free.

If you were using MSI then I would recommend a LaunchCondition - but I don't think it is valid for you.

https://msdn.microsoft.com/en-us/library/windows/desktop/aa369752(v=vs.85).aspx

Chad
0 Kudos