Start program distributed with one click install

  • Thread starter Thread starter Tim Kelley
  • Start date Start date
T

Tim Kelley

I have an application that I have distributed using one click install. I
selected the option to allow the program to be run if the server is offline.
From another program I want to be able to check if the first program is
running (easy enough) and start it (not so easy) if it is not running. The
shortcut that is created in the start menu is an application reference. My
question is, how do I replicate the function of the application reference
shortcut in my C# program to start the first program?
Thanks,

Tim
 
I have an application that I have distributed using one click install. I
selected the option to allow the program to be run if the server is offline.
From another program I want to be able to check if the first program is
running (easy enough) and start it (not so easy) if it is not running. The
shortcut that is created in the start menu is an application reference. My
question is, how do I replicate the function of the application reference
shortcut in my C# program to start the first program?
Thanks,

Tim

If i have understood you correctly.
private void StartApplication()
{



string executablePath =
Path.Combine(Settings.Default.DestinationPath,
Settings.Default.ApplicationExecutable);

ProcessStartInfo applicationStartInfo = new
ProcessStartInfo(executablePath);

Process.Start(applicationStartInfo);


}


/// I havent used this yet..
void CheckProcess()
{
Process[] processes =
Process.GetProcessesByName(Settings.Default.ApplicationExecutable);

if (processes.Length > 1)
{

}
}
 
Back
Top