caoimhincryan
asked on
Run executable AFTER deployment project completes the installation
Hi all,
I have created a custom .NET project and have created the setup deployment project. The setup runs fine.
What I'm looking to do is, after my setup completes installation, is there a way to get the .exe of the Project to run?
I have created a custom .NET project and have created the setup deployment project. The setup runs fine.
What I'm looking to do is, after my setup completes installation, is there a way to get the .exe of the Project to run?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
as per my knowledge this is the event that will be fired when the installation is committed and the following code section of your installer class will be executed on the commit
// Event handler for 'Committed' event.
private void MyInstaller_Committed(obje ct sender, InstallEventArgs e)
{
try
{
Directory.SetCurrentDirect ory(Path.G etDirector yName
(Assembly.GetExecutingAsse mbly().Loc ation));
Process.Start(Path.GetDire ctoryName(
Assembly.GetExecutingAssem bly().Loca tion) + "\\InstallSample.exe");
}
catch
{
// Do nothing...
}
}
can you try one thing - try to execute the below line from a new project to see if the Process.Start can actually start any .net executable
Process.Start(Path.GetDire ctoryName( Assembly.G etExecutin gAssembly( ).Location ) + "\\InstallSample.exe");
// Event handler for 'Committed' event.
private void MyInstaller_Committed(obje
{
try
{
Directory.SetCurrentDirect
(Assembly.GetExecutingAsse
Process.Start(Path.GetDire
Assembly.GetExecutingAssem
}
catch
{
// Do nothing...
}
}
can you try one thing - try to execute the below line from a new project to see if the Process.Start can actually start any .net executable
Process.Start(Path.GetDire
ASKER
I tried that and it does start any .net Execuatable.
Do you know if what exactly this means for the primary output that is added:
In the Properties window, make sure that the InstallerClass property is set to True (this is the default).
Do you know if what exactly this means for the primary output that is added:
In the Properties window, make sure that the InstallerClass property is set to True (this is the default).
ASKER
Where do i access my installerClass?
i think everything was clearly mentioned in the sample - how to override the installer base class
you needed to do some programming for it
you needed to do some programming for it
ASKER
Thanks again..
ASKER
Im using VS2008 but I doubt that is the difference is it??