Start program distributed with one click install

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
 
P

parez

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)
{

}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top