This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Test for 64-bit OS before prerequisites install [InstallScript]
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
Jun 20, 2017
08:48 AM
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.
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.
- Tags:
- prerequisites
(1) Reply
Jun 20, 2017
03:39 PM
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
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