I have created a Simple Windows Application, and its Installer too (Setup project
).
Since I want to AutoLaunch the Application after Installation, I added this script in Installer.cs
public override void Commit(System.Collections.IDictionary savedState)
{
string appPath = Context.Parameters["AssemblyPath"].ToString();
System.Threading.Thread.Sleep(500);
System.Diagnostics.Process.Start(appPath, "2");
}
Application Launches perfect, but it is running as SYSTEM user
.
I want Auto Launched application to be run in the Default user
which opens the MSI.
I got solution from this post
Start a windows service and launch cmd
This solves my problem of SYSTEM
user