glavian999
Posts: 6
Joined: Tue Jun 09, 2009 4:35 pm

Removing all Prerequisite Install Conditions

I don't want an install condition on the DirectX9 Prerequisite, I want it to install regardless. I can't seem to delete the condition. Is there an easy way to do this that I'm missing.

Thanks,
Keith
cbono
Posts: 42
Joined: Thu Aug 14, 2008 10:11 pm

Re: Removing all Prerequisite Install Conditions

I think there always has to be at least 1 condition for a Prerequisite install. The condition is there not only to evaluate whether or not the Prerequisite needs to be offered, but also to check afterwards that the install was successful.

The DX9 installer will put a specific version on the runtime on the machine; I'd just play along and do a file/registry check for that specific version. Is there some reason that the prereq installer should run even if the user has the most current version?
glavian999
Posts: 6
Joined: Tue Jun 09, 2009 4:35 pm

Re: Removing all Prerequisite Install Conditions

So I take it this should be a feature request then.

Yes Microsoft recommends that you install DirectX regardless of what is installed based on their documentation.

<http://msdn.microsoft.com/en-us/library ... S.85).aspx>

Install the redistributable components every time.
A game’s installation process should install the DirectX redistributable components during every single installation without allowing users to opt-out of it. If you allow opting-out, then some users will guess that they don’t need it, and if they actually do, the game will not run.

Thanks
Keith
cbono
Posts: 42
Joined: Thu Aug 14, 2008 10:11 pm

Re: Removing all Prerequisite Install Conditions

I see -- that sounds like a totally reasonable thing to do then.

It would be easy enough to craft a condition that always evaluated to "false" during the Prerequisite check, and thus always install the DX9 package. But the caveat is that the condition needs to evaluate to "true" after the install, otherwise your bootstrapper will throw up a red flag that a Prerequisite was not successfully installed.

Is there any file that gets installed/generated by the DX9 package that would vary from install to install? If so, you might be able to suss out some sort of Condition or Search that could key off of that. Definitely not ideal, regardless.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Removing all Prerequisite Install Conditions

Hi,

Unfortunately a prerequisite needs to have a detection criteria. However, if you want to always install DirectX you can try this approach:
- add the DirectX installation files as temporary files in the "Files and Folders" page
- use a custom action scheduled under "InstallUISequence" -> "MigrateFeatureStates" standard action to launch the DirectX installer
- make sure that the custom action uses the Synchronous execution, check return code option to make the main install wait for the custom action to finish

This way DirectX will always be installed before the main install is started.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
glavian999
Posts: 6
Joined: Tue Jun 09, 2009 4:35 pm

Re: Removing all Prerequisite Install Conditions

Great, Sounds easy enough...

Thanks,
Keith

Return to “Common Problems”