.NET Questions (CLOSED)

Questions and Answers on any aspect of .NET. Now closed.

This discussion group is now closed.

Have a question about .NET development? Try stackoverflow.com, a worldwide community of great developers asking and answering questions 24 hours a day.

The archives of .NET Questions contain years of Q&A. Even older .NET Questions are still online, too.

how to get application or installed path of software

I am writing a plugin for some software.. but i need to know the path for that software can anyone guide me in this regard....

for example Say i am writing the plugin for the yahoo messnger the enduser may have been installed it in drive c:,d: or e: or even in subfolder is there any way to find the  path and directory of the installed software.... i have been successfull in reading all the directory and drives and finding the path.... but this method takes lot of cpu time and does not work if duplicate directory exist is there any other method to find the path?????????????????
MCV Send private email
Sunday, January 21, 2007
 
 
Application.StartupPath should do the trick.
Stoo Send private email
Monday, January 22, 2007
 
 
Use the Windows APIs GetModuleHandle and GetModuleFileName.
JSmith Send private email
Monday, January 22, 2007
 
 
Hey Application.Path gives the path of my s/w/my working directory  but i want to know where yahoo msngr is installed by googling i got to know we have to read the registry to retrieve the path but i am not finding how to start or not getting any sample program.... if any of u guys cul'd help me out?????
MCV Send private email
Monday, January 22, 2007
 
 
First of all, this is not a .NET question so you might want to try posting somewhere else. Since it is Yahoo specific you might also try one of their forums.

The location of installation information is always program specific so you will need to just go chase it down yourself unless Yahoo wants to supply this info to you. And I wouldn't be surprised if the information changes from version to version or OS to OS.

A better question would probably be: why do you need it in the first place? Is there an easier way to implement what you are trying to do? Sometimes the implementations we choose seem simple at first but end up being much harder than alternatives because they are based on information which is difficult to obtain or that changes often.
anon
Monday, January 22, 2007
 
 
For almost all programs this information is in the registry.
Philip Connors Send private email
Thursday, January 25, 2007
 
 
Open .NET help and search for "registry".  There's a whole .NET .Class for registry related tasks.
Philip Connors Send private email
Thursday, January 25, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz