Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem with shortcut in C# setup project
    primarykey
    data
    text
    <p>I have a setup project with a custom installer class which launch the application at the end of the installation. In the setup, I create a shortcut to the output of the application. The installation goes fine. But when I click on the shortcut, the installer restart and the application launch at the same time? Why?</p> <p>No, the code of my custom class is:</p> <pre><code>/// &lt;summary&gt; /// Installer class to automatically launch the application at the end of the installation/ /// &lt;/summary&gt; [RunInstaller(true)] public partial class InstallerStartApplication : Installer { /// &lt;summary&gt; /// Initializes a new instance of the &lt;see cref="InstallerStartApplication"/&gt; class. /// &lt;/summary&gt; public InstallerStartApplication() { InitializeComponent(); } /// &lt;summary&gt; /// Raises the &lt;see cref="E:System.Configuration.Install.Installer.AfterInstall"/&gt; event. /// &lt;/summary&gt; /// &lt;param name="savedState"&gt;An &lt;see cref="T:System.Collections.IDictionary"/&gt; that contains the state of the computer after all the installers contained in the &lt;see cref="P:System.Configuration.Install.Installer.Installers"/&gt; property have completed their installations.&lt;/param&gt; protected override void OnAfterInstall(IDictionary savedState) { base.OnAfterInstall(savedState); } // Override the 'Install' method. public override void Install(IDictionary savedState) { base.Install(savedState); } // Override the 'Commit' method. public override void Commit(IDictionary savedState) { base.Commit(savedState); try { Directory.SetCurrentDirectory(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); Process.Start(Path.Combine(Directory.GetCurrentDirectory(), "IERssNotificator.exe"), "-c"); } catch (Exception ex) { Debug.WriteLine(ex); } } // Override the 'Rollback' method. public override void Rollback(IDictionary savedState) { base.Rollback(savedState); } } </code></pre> <p>I launch this at install and commit custom action.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload