Click here to Skip to main content
15,891,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I've created a setup and was open a winform dialog box where user will enter some details which i need to save as xml in the same location where it is being installed.so i am wondering how can i get the path of the instllation folder as my winform dialog is open from other class library as a separate installer
Posted

Why can't you store the installation path of your class library say some where like registry and then you can read it back.
Or use AppData folder to store necessary information
 
Share this answer
 
C#
string installationPath =Parent.Context.Parameters["assemblypath"].ToString();
installationPath =installationPath.Substring(0, installationPath.LastIndexOf("\\")));
 
Share this 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