Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

playing with windows registry(2) ...help!!

Status
Not open for further replies.

malayaj

Programmer
Mar 19, 2001
11
0
0

hello friends,
In my earlier thread i think I was too general ,
To be specific...This is new one.
My Problem is that-
I have a Software ABC which is installed on my computer.
I am developing a component for that s/w in VC++ using MFC in which i need
the whole path of exe of that software where it is installed on that system from windows registry at run time.
How can I do this ?

pl. reply asap...

Regards
malayaj
 
Do you have any troubles, or you want just a registry encyclopedia? John Fill
1c.bmp


ivfmd@mail.md
 
malayaj -

First of all, you need to know where the value you seek (the path to the ABC.exe) is stored in the registry. Once you have that, you can then use the RegOpenKey, RegQueryValue, and RegClosekey functions to retrieve the value.

If you have the ability to make changes to your ABC.exe, you can have it write it's location into the registry at a known location. Typically, this would be HKEY_LOCAL_MACHINE\Software\vendorname\key name

Chip H.
 
Also you can:
#include <atlbase.h> // in stdafx.h

and use CRegKey class.
For more information see MSDN.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top