Click here to Skip to main content
15,891,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Friends
I am Creating a exe in that I am running one msi file.For that I added that msi file to project and now When I am running this application thru .net enviorement then its running and msi file also runnig but when I copied my this exe file to some other place then its showing that path not found.

And to run my msi file from exe I m using this relative path given below:
installerFilePath = @"../../sss1.msi";
     System.Diagnostics.Process installerProcess;
     installerProcess = System.Diagnostics.Process.Start(installerFilePath , "/q");


Thanks In Advance.
Regards
Yogesh
Posted

Yes, if you move your exe, the relative path will change. That's what a relative path MEANS, relative to the working directory of the exe that uses it.
 
Share this answer
 
Thanks Christian
THats fine.So whats the solution to this problem If I copy my exe to some other place.Do I need to copy my msi file there too or any other solution?

Regards
Yogesh
 
Share this answer
 
Comments
Christian Graus 2-Aug-10 1:38am    
Don't push 'answer' to add comments. Use the comment button, as I have done. Yes, if your exe has files that it runs or uses, the folder structure needs to be maintained, there's not any other easy way to make it work.
Toli Cuturicu 2-Aug-10 3:42am    
Reason for my vote of 1
fake answer

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