.Net Support Class - 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!

Thibault
Posts: 4
Joined: Thu Sep 14, 2006 3:25 pm

.Net Support Class

I'm testing your product (Ent. version)
And i'm tryingt to a add a .Net Custom Action.

So I added an action called dotNetCustAct.dll into Target Computer/InstallExecuteSequence/Commit

this action points to a dll (installed file) called MyCompany.Installer.dll :

Code: Select all

namespace MyCompany.Installer
{
    [RunInstaller(true)]
    public partial class AppConfig : System.Configuration.Install.Installer
    {
        public AppConfig()
        {
            InitializeComponent();
        }

        public void LaunchDotNetCustomAction()
        {
            System.Windows.Forms.MessageBox.Show("toto");
        }
    }
}
After built the dll and the advInst project, when I run my setup.exe I recieve an error message :
"Installer Information"
"Could not find file 'C:\Program Files\MyCompany\MyProduct\MyCompany.Installer.InstallState'."

What is this file ?
Does I miss something?

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

Re: .Net Support Class

Hi,

Please note that a DLL used by a .NET Installer Class Actions needs to be written in a specific way. You can find a tutorial here.

When creating the custom action, you are prompted about the DLL. After selecting the DLL you should not modify the "Source Path", "Source Type" and "Function Name" fields. This is because the .NET Installer Class Action uses a function ("LaunchDotNetCustomAction") from an Advanced Installer DLL ("dotNetCustAct.dll") to run your .NET file.

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

Return to “Common Problems”