Click here to Skip to main content
15,921,452 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
Hi Friends,

I want to install a MSI file through my webapplication, for that i create an application in visualstudio and run the app it's working fine.
But when i host the webapp into IIS it was not working. means after button click it is just loading for hours.
Below is my code on buttonclick.

protected void Button1_Click(object sender, EventArgs e)
{
System.Diagnostics.Process process1 = new System.Diagnostics.Process();
process1.StartInfo.WorkingDirectory = Server.MapPath("/Installer1");
process1.StartInfo.FileName = Request.MapPath("Demo.msi");
process1.StartInfo.Arguments = "USER=abc PASSWORD=123 VERSION=1.0.0.0 ";
process1.StartInfo.LoadUserProfile = true;
process1.Start();
process1.WaitForExit();
process1.Close();
}


Can anybody help me in my situation.


Thanks
Ramana.K
Posted
Comments
Kornfeld Eliyahu Peter 18-Nov-14 2:14am    
Where do you thin this MSI will run? Client? Server? (no prize for correct answer!)
Did you checked if IIS user has the proper rights to run the MSI?
Check events (Event Viewer) on server - you find there some answers...
Ramana RK 21-Nov-14 0:02am    
Hi,tnq..
I want to run on both Client n Server
Ichecked IIS and gave full rights to user but it not works
do you have any more suggestions?
Nathan Minier 18-Nov-14 7:20am    
I'd also like to add that you need to make sure that your AppPool has access to your directory.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900