Search code examples
.netsetup-deployment

Registration during Setup/Install packages


Is it possible to register a .NET component during the installation of a VB6 app?

Is it also possible to grant security (eg. via CAPSOL) as part of an installation package?

Will InnoSetup do this?


Solution

  • Corresponds to http://www.jrsoftware.org/ishelp/index.php?topic=filessection you can use StrongAssemblyName with the flag gacinstall in the [Files] section (see also Adding assemblies to the GAC from Inno Setup and http://www.experts-exchange.com/Microsoft/Applications/Q_25148021.html). You should do this only is assembly which you install a strong type assembly. Other .NET assembly which hat a interop part for usage from COM/VB can be installed like other DLLs or COM-dlls.

    With possibility to implement custom functionality (see http://www.jrsoftware.org/iskb.php?custom) you can run any exe during the setup and so make some work which is not exist out-of-the-box.

    With respect of permission entry in [Dirs] section (see http://www.jrsoftware.org/ishelp/index.php?topic=dirssection) you can set permission on all file components which you install. The same permission entry in [Regisry] section (see http://www.jrsoftware.org/ishelp/index.php?topic=registrysection) allow you to set permission in registry.

    UPDATED: If you do need use caspol.exe (http://go.microsoft.com/fwlink/?LinkId=131738) you can use custom functionality (see http://www.jrsoftware.org/iskb.php?custom) to start this or look at execute caspol from within vbscript for discussion about the usage of caspol.exe. An example for usage caspol.exe in [Run] section you can find in http://zerosandtheone.com/blogs/vb/archive/2008/06/23/vb-net-install-your-app-and-the-net-framework-using-inno-setup.aspx (search on the page for "v2.0.50727\CasPol.exe")