Click here to Skip to main content
15,899,126 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionDeploying application forms of C# in VS.NET Pin
Eyungwah15-Feb-07 11:25
Eyungwah15-Feb-07 11:25 
AnswerRe: Deploying application forms of C# in VS.NET Pin
Zoltan Balazs15-Feb-07 13:04
Zoltan Balazs15-Feb-07 13:04 
QuestionDeployment question Pin
JoltWork15-Feb-07 7:01
JoltWork15-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
JoltWork21-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
JoltWork21-Feb-07 6:19 
AnswerRe: Deployment question Pin
perlmunger21-Feb-07 7:01
perlmunger21-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
Neeraj_Maurya15-Feb-07 5:35
Neeraj_Maurya15-Feb-07 5:35 
AnswerRe: Transaction on Dataset in ADO.net Pin
Colin Angus Mackay15-Feb-07 6:03
Colin Angus Mackay15-Feb-07 6:03 
QuestionGeneric Signatures on remoting objects Pin
LukeHammond15-Feb-07 3:00
LukeHammond15-Feb-07 3:00 
QuestionRe: Generic Signatures on remoting objects Pin
LukeHammond15-Feb-07 3:03
LukeHammond15-Feb-07 3:03 
QuestionRe: Generic Signatures on remoting objects Pin
LukeHammond15-Feb-07 3:11
LukeHammond15-Feb-07 3:11 
QuestionHow to create synchronous socket? Pin
Banks K14-Feb-07 22:19
Banks K14-Feb-07 22:19 
Questiondraw the shapes on top of the controls... Pin
sathishtl00714-Feb-07 19:36
sathishtl00714-Feb-07 19:36 
AnswerRe: draw the shapes on top of the controls... Pin
Simon P Stevens17-Feb-07 2:42
Simon P Stevens17-Feb-07 2:42 
QuestionCalling C# method from a JavaScript program Pin
earlgraham14-Feb-07 12:14
earlgraham14-Feb-07 12:14 
AnswerRe: Calling C# method from a JavaScript program Pin
N a v a n e e t h14-Feb-07 18:05
N a v a n e e t h14-Feb-07 18:05 
AnswerRe: Calling C# method from a JavaScript program Pin
perlmunger21-Feb-07 7:08
perlmunger21-Feb-07 7:08 
GeneralRe: Calling C# method from a JavaScript program Pin
earlgraham22-Feb-07 11:10
earlgraham22-Feb-07 11:10 
QuestionPerfomance of application Pin
cocoonwls14-Feb-07 10:57
cocoonwls14-Feb-07 10:57 
AnswerRe: Perfomance of application Pin
Luc Pattyn14-Feb-07 11:09
sitebuilderLuc Pattyn14-Feb-07 11:09 
GeneralRe: Perfomance of application Pin
cocoonwls14-Feb-07 11:28
cocoonwls14-Feb-07 11:28 
GeneralRe: Perfomance of application Pin
Luc Pattyn14-Feb-07 11:40
sitebuilderLuc Pattyn14-Feb-07 11:40 
GeneralRe: Perfomance of application Pin
cocoonwls14-Feb-07 11:58
cocoonwls14-Feb-07 11:58 

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

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