Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to start an MSI which lives on network share, however the msiexec 'help' dialog shows instead (which indicates something is wrong with the process start info):

string testPath1 = @"\\mynetwork.share.com\dev\builds 1.0\product.msi";  //DOESN'T WORK
string testPath2 = @"C:\users\username\desktop\product.msi";         //DOES WORK

ProcessStartInfo startMsiexecProcess = new ProcessStartInfo(@"C:\windows\system32\msiexec.exe");
startMsiexecProcess.Arguments = @"/i " + testPath1;
Process.Start(startMsiexecProcess);

I have tried variations on the testPath1 - ie not using fully qualified name, and other network shares. I have tried adjusting the spacing on the Arguments, as well.

Finally, if I change the 'local' path to a fully qualified format like this:

string testPath2 = @"\\mylocalmachine.domain.com\c$\users\username\desktop\product.msi";

..it does work correctly. So this gives me confidence that it is likely not a badly formed string causing the issue when I try to execute this on the network share.

Is this possible to run an msi from network share?

share|improve this question

migrated from stackoverflow.com Mar 23 '13 at 19:36

This question came from our site for professional and enthusiast programmers.

    
This looks like a better fit on Super User or Server Fault –  Mike Pennington Mar 23 '13 at 13:40

1 Answer 1

up vote 0 down vote accepted

It is the space in my path: "builds 1.0". Process.Start may be interpreting this as an argument delimiter.

To resolve I added quotes around the path to the MSI being run ie:

"\"" + testPath1 + "\""

this post led me to the solution: how-to-handle-values-with-spaces-in-process-start-in-c-sharp

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.