Click here to Skip to main content
12,633,990 members (24,385 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# setup
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 22-Apr-12 6:32am
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

string installationPath =Parent.Context.Parameters["assemblypath"].ToString();
installationPath =installationPath.Substring(0, installationPath.LastIndexOf("\\")));
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161208.2 | Last Updated 23 Apr 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100