Hi,
Can anybody solve my problem.
I have one small windows Application. In this application i have added Installer Class. which start a program after the setup project installation is completed.
when setup is completed it starts the program. but the problem is it starts the under the user "NT AUTHORITY\SYSTE M", I want to start this program under the user which is logged in (User Logged in user windows authentication) .
Can anybody solve my problem.
I have one small windows Application. In this application i have added Installer Class. which start a program after the setup project installation is completed.
Code:
private void Installer1_AfterInstall(object sender, InstallEventArgs e)
{
Directory.SetCurrentDirectory(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
Process p = new Process();
InstallContext cont = this.Context;
//ProcessStartInfo inf = new ProcessStartInfo(cont.Parameters["assemblypath"]);
p.StartInfo.FileName = (cont.Parameters["assemblypath"]);
p.StartInfo.UseShellExecute = false;
p.StartInfo.LoadUserProfile = true;
p.Start();
}
Comment