Solved

Find the Path and Version of Applications which installed in Window2000 by using Visual C++

Posted on 2003-11-25
4
934 Views
Last Modified: 2010-04-01
Dear all,

Can you help me to find the Path and Version of all Applications which installed in Window2000 by using Visual C++?

I mean applications that you can see them in Add/Remove Programs Control Panel.

Thanks in advance !

DungNgo.
0
Comment
Question by:dungngo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 9816767
This is not a C++ language question and it off topic here.  A much better place for this would be the WINDOWS PROGRAMMING topic area:

http://www.experts-exchange.com/Programming/Programming_Platforms/Win_Prog/

You should post a comment for the moderator in the CS topic area:

http://www.experts-exchange.com/Community_Support/

and ask them to move your question to the right topic area.  It helps things all around and benefits you by getting Windows Programming experts on your question vs. C++ experts here.
0
 
LVL 39

Accepted Solution

by:
itsmeandnobodyelse earned 125 total points
ID: 9816811
You'll find the programs  in the Windows registry

       HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

Any subkey represents

You may open the key using RegOpenKeyEx, e. g.


    HKEY  hkeyTop   = HKEY_LOCAL_MACHINE;
    HKEY  hkey      = NULL;
    long  rc        = 0L;
   

    if ((rc = RegOpenKeyEx(hkeyTop,
                "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall", 0, KEY_READ, hkey))
          != ERROR_SUCCESS)
    {
        cout << "key SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall was not found. rc= " << rc << "\n";
        return 2;
    }

Then you might query for all subkeys using RegEnumKey

   char  szSubKey[512] = { '\0' };
   DWORD dwSize = 512;
   DWORD  dwIdx = 0; // index of subkey to enumerate
   while ((rc = RegEnumKey(hkey, dwIdx, szSubKey, &dwSize)
          == ERROR_SUCCESS)
    {
          dwIdx++;
          // do something with szSubKey
          ....
    }

Hope, that helps

Alex

0
 
LVL 9

Expert Comment

by:tinchos
ID: 10285819
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: itsmeandnobodyelse {http:#9816811}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question