Click here to Skip to main content
11,566,149 members (50,538 online)

.NET Framework

 
GeneralRe: System Colours Pin
Simon Stevens17-Feb-07 2:01
memberSimon Stevens17-Feb-07 2:01 
AnswerRe: System Colours Pin
Heath Stewart17-Feb-07 6:07
protectorHeath Stewart17-Feb-07 6:07 
GeneralRe: System Colours Pin
Simon Stevens18-Feb-07 22:02
memberSimon Stevens18-Feb-07 22:02 
QuestionHow to write NUNIT Test Cases for Crystal Reports? Pin
Harshal Nemade15-Feb-07 22:19
memberHarshal Nemade15-Feb-07 22:19 
QuestionMonitor Chat Server Using WMI in c# .net Pin
Member #182410015-Feb-07 20:48
memberMember #182410015-Feb-07 20:48 
AnswerRe: Monitor Chat Server Using WMI in c# .net Pin
Dave Kreskowiak16-Feb-07 8:40
mvpDave Kreskowiak16-Feb-07 8:40 
QuestionDeploying application forms of C# in VS.NET Pin
Eyungwah15-Feb-07 11:25
memberEyungwah15-Feb-07 11:25 
AnswerRe: Deploying application forms of C# in VS.NET Pin
Zoltan Balazs15-Feb-07 13:04
memberZoltan Balazs15-Feb-07 13:04 
QuestionDeployment question Pin
JoltWork15-Feb-07 7:01
memberJoltWork15-Feb-07 7:01 
AnswerRe: Deployment question Pin
Heath Stewart17-Feb-07 6:10
protectorHeath Stewart17-Feb-07 6:10 
GeneralRe: Deployment question Pin
JoltWork21-Feb-07 2:24
memberJoltWork21-Feb-07 2:24 
GeneralRe: Deployment question Pin
Heath Stewart21-Feb-07 4:13
protectorHeath Stewart21-Feb-07 4:13 
GeneralRe: Deployment question Pin
JoltWork21-Feb-07 6:19
memberJoltWork21-Feb-07 6:19 
AnswerRe: Deployment question Pin
perlmunger21-Feb-07 7:01
memberperlmunger21-Feb-07 7:01 
If you create your own project installer (System.Configuration.Install.Installer), you can easily get the install path by just using reflection on the executing assembly. Here is some code I use to do this in my installer:
/// Since this assembly is being run from the install directory, it will return the full
/// path to this assembly. You can simple get the directory path using a FileInfo object
/// to know where it's been installed.
System.Reflection.Assembly asm = System.Reflection.Assembly.GetExecutingAssembly();
string baseAppDir = (new System.IO.FileInfo( asm.Location )).DirectoryName;
 
/// We're certain this exists because our setup program created it.
RegistryKey softwareKey = Microsoft.Win32.Registry.LocalMachine
               .OpenSubKey( "Software", true )
               .OpenSubKey( "Company Name", true )
               .OpenSubKey( "Application Name", true );
 
softwareKey.SetValue( "InstallLocation", configFilepath );
Keep in mind that I added a registry value in setup project that creates the HKLM\Software\Company Name\Application Name\InstallLocation key with some default or empty value. The setup project actually creates the keys you specified in the registry editor part of the setup project before it calls your code in the Installer class.

-Matt

------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall

QuestionTransaction on Dataset in ADO.net Pin
neerajxp15-Feb-07 5:35
memberneerajxp15-Feb-07 5:35 
AnswerRe: Transaction on Dataset in ADO.net Pin
Colin Angus Mackay15-Feb-07 6:03
mvpColin Angus Mackay15-Feb-07 6:03 
QuestionGeneric Signatures on remoting objects Pin
LukeHammond15-Feb-07 3:00
memberLukeHammond15-Feb-07 3:00 
QuestionRe: Generic Signatures on remoting objects Pin
LukeHammond15-Feb-07 3:03
memberLukeHammond15-Feb-07 3:03 
QuestionRe: Generic Signatures on remoting objects Pin
LukeHammond15-Feb-07 3:11
memberLukeHammond15-Feb-07 3:11 
QuestionHow to create synchronous socket? Pin
Banks K14-Feb-07 22:19
memberBanks K14-Feb-07 22:19 
Questiondraw the shapes on top of the controls... Pin
sathishtl00714-Feb-07 19:36
membersathishtl00714-Feb-07 19:36 
AnswerRe: draw the shapes on top of the controls... Pin
Simon Stevens17-Feb-07 2:42
memberSimon Stevens17-Feb-07 2:42 
QuestionCalling C# method from a JavaScript program Pin
earlgraham14-Feb-07 12:14
memberearlgraham14-Feb-07 12:14 
AnswerRe: Calling C# method from a JavaScript program Pin
Navaneethkn14-Feb-07 18:05
memberNavaneethkn14-Feb-07 18:05 
AnswerRe: Calling C# method from a JavaScript program Pin
perlmunger21-Feb-07 7:08
memberperlmunger21-Feb-07 7:08 
GeneralRe: Calling C# method from a JavaScript program Pin
earlgraham22-Feb-07 11:10
memberearlgraham22-Feb-07 11:10 
QuestionPerfomance of application Pin
cocoonwls14-Feb-07 10:57
membercocoonwls14-Feb-07 10:57 
AnswerRe: Perfomance of application Pin
Luc Pattyn14-Feb-07 11:09
memberLuc Pattyn14-Feb-07 11:09 
GeneralRe: Perfomance of application Pin
cocoonwls14-Feb-07 11:28
membercocoonwls14-Feb-07 11:28 
GeneralRe: Perfomance of application Pin
Luc Pattyn14-Feb-07 11:40
memberLuc Pattyn14-Feb-07 11:40 
GeneralRe: Perfomance of application Pin
cocoonwls14-Feb-07 11:58
membercocoonwls14-Feb-07 11:58 
GeneralRe: Perfomance of application Pin
Luc Pattyn14-Feb-07 12:06
memberLuc Pattyn14-Feb-07 12:06 
GeneralRe: Perfomance of application Pin
cocoonwls14-Feb-07 12:21
membercocoonwls14-Feb-07 12:21 
GeneralRe: Perfomance of application Pin
Luc Pattyn14-Feb-07 12:37
memberLuc Pattyn14-Feb-07 12:37 
GeneralRe: Perfomance of application Pin
Iqbal M Khan14-Feb-07 20:09
memberIqbal M Khan14-Feb-07 20:09 
AnswerRe: Perfomance of application Pin
Heath Stewart17-Feb-07 6:15
protectorHeath Stewart17-Feb-07 6:15 
QuestionProblems with getProcessesByName Pin
derbrink14-Feb-07 3:31
memberderbrink14-Feb-07 3:31 
AnswerRe: Problems with getProcessesByName Pin
Luc Pattyn14-Feb-07 6:51
memberLuc Pattyn14-Feb-07 6:51 
QuestionFixed a window Form Pin
Parameswar Mala14-Feb-07 1:27
memberParameswar Mala14-Feb-07 1:27 
AnswerRe: Fixed a window Form Pin
Heath Stewart17-Feb-07 6:25
protectorHeath Stewart17-Feb-07 6:25 
QuestionMenuItem Compact Framework [modified] Pin
danaelx14-Feb-07 1:11
memberdanaelx14-Feb-07 1:11 
QuestionResolution Problem. Pin
Parameswar Mal14-Feb-07 1:06
memberParameswar Mal14-Feb-07 1:06 
AnswerRe: Resolution Problem. Pin
Luc Pattyn14-Feb-07 6:54
memberLuc Pattyn14-Feb-07 6:54 
AnswerRe: Resolution Problem. Pin
Navaneethkn14-Feb-07 18:34
memberNavaneethkn14-Feb-07 18:34 
QuestionIs it possible to run a vb.net application without Visual Studio?? Pin
China-Gary13-Feb-07 12:41
memberChina-Gary13-Feb-07 12:41 
AnswerRe: Is it possible to run a vb.net application without Visual Studio?? Pin
Pete O'Hanlon14-Feb-07 1:42
memberPete O'Hanlon14-Feb-07 1:42 
QuestionCharmap - Like control? Pin
PhoenixHawk13-Feb-07 5:40
memberPhoenixHawk13-Feb-07 5:40 
AnswerRe: Charmap - Like control? Pin
Ed.Poore14-Feb-07 6:45
memberEd.Poore14-Feb-07 6:45 
AnswerRe: Charmap - Like control? Pin
Ray Cassick16-Feb-07 10:35
memberRay Cassick16-Feb-07 10:35 
QuestionDoes the System.Diagnostics.Process.Kill() trigger an event? Pin
jeremy.t13-Feb-07 5:26
memberjeremy.t13-Feb-07 5:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.150624.2 | Last Updated 30 Jun 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid