shelly shelly

shelly shelly

  • NA
  • 3
  • 2.8k

Help in Custom action Setup project

Mar 6 2011 5:36 AM

Hello All,

Please give your ideas:

In a solution file ,I am having two projects PROJECTA and SETUP project. After creating the installer of PROJECTA , the installer "example.msi" contains PROJECTA.exe ( or active output ) of the PROJECTA .

While installing "example.msi", i want to run the PROJECTA.exe in the background.

I tried custom control and also installer class

If the path of the exe was given ( as shown below) , it works fine. but this is not the intended behaviour , i want PROJECTA.exe which is in example.msi to be copied to that location before installation , so that i can run from there during installation.

How this can be achieved .

C# Syntax :

[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand)]

    public override void Install(IDictionary stateSaver)
   
{
       
base.Install(stateSaver);
   
}

   
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand)]
   
public override void Commit(IDictionary savedState)
   
{
       
base.Commit(savedState);
       
string s="C:\\xxx\\PROJECTA.exe";
       
System.Diagnostics.Process.Start(s);

   
}

Thank you in advance.


Answers (4)