Checking GAC for pre-requisite - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

marcelo
Posts: 103
Joined: Fri Sep 28, 2007 2:07 pm

Checking GAC for pre-requisite

Hi,

I need to check if a assembly exists on GAC as a pre-requisite. Is there a way I can make AI check this for me without having to rely on scripts? And if not, how can I run a .net code to check this information for me as a pre-requisite?

Thanks,
Marcelo
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Checking GAC for pre-requisite

Hi Marcelo,

A prerequisite is something that the package needs to run or install before it can be launched. Therefore, if you create a prerequisite it should be an installation package or a program that does something to the target computer. Each prerequisite uses install conditions in order to determine if it will be installed or not. These install conditions can be searches which try to find files or registry entries or they can be searches performed by custom executables.

For your prerequisite you can create a "File Version" search which tries to find the assembly you want. The target of the search should be an assembly file in the GAC, for example:

Code: Select all

[WindowsFolder]assembly\GAC\System.Xml\1.0.5000.0__b77a5c561934e089\System.XML.dll
Please note that you need to search for the actual file of the assembly. In order to find it in the "C:\Windows\assembly" folder you can use the command shell or a tool which can show the files in this folder (Windows Explorer does not show the assembly files).

If your package doesn't have any prerequisites and you only need to find out if an assembly is in the GAC, you can use a file search in the Search page. The property of the search will be empty if the assembly is not found and it will contain the path of the assembly if it's found.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”