Click to See Complete Forum and Search --> : Detect if running application was installed for all users


ajosea
January 24th, 2006, 04:31 PM
Hi,
I've got the following problem: I have HINSTANCE of running executable and need to determine, if this executable was installed for all users or for actual user only. I know that installation for actual user stores data in HKEY_CURRENT_USER registry and installation for all users stores data in HKEY_LOCAL_MACHINE registry. But which keys should I be looking for? I can simply obtain full path to the running executable from the given HINSTANCE, but it gives me no glue, which registry key is the right one. The solution I'm looking for should be as universal as possible, but can not be based on searching all registry values as this is very time consuming.

Thank you for any hints.
Josef Andrysek

NoHero
January 25th, 2006, 04:14 AM
Well... thats difficult though since every application can name their registry keys as they want. It does not have to something with the executeable though. A hint may be the version info (like the Company name etc.) of the executable file.