I would like to know how I execute an MSI from an ASPX page.

My requirement is that a user should be able to upload his MSI in my ASPX page and, on completion of upload of the MSI, my ASPX should be able to install the MSI on the server.

I have tried to test on the local machine and it works. But if I try to install on a remote machine the call to Process.WaitForExit which waits for the installation to complete hangs. - I can see the msiexec on the task manager

Please let me know if you can provide any info / links / ideas.

Thanks,

You do realize that .msi installers have custom launch conditions which can run pretty much any kind of code they want, right? So you're basically letting anyone run an .exe on your server.

On your local machine are you using the IIS Development Server or full blown IIS to test this? For a standard install this would be equivelant to the IIS_USER account running an .msi file which would require full trust and maybe even additional permissions on the user account .. i'd have to check.

Also does the .msi file install silently or does it pop up with dialogs? If the .msi came up with the screens "Next >> Next >> Next" then it would never finish and your code would get hung up at .WaitForExit() .

Thanks for the reply.
Yes, I understand the consequences.
I am using IIS 7.0 from win 2k8 enterprise installation to test this.
The msi actually executes silently.

I encountered the same issue if I invoked a Windows service from the Page to perform the installation (via WCF service).

Please let me know if there any other ideas/suggestions.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.