This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Issues with RegDBKetExist (some guid) returning -1
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 13, 2014
04:58 PM
Issues with RegDBKetExist (some guid) returning -1
Hello Everyone,
I have been trying to remove a program within an InstallScript project. Currently I look for the GUID within HKEY_LOCAL_MACHINE, but every time I send a key that contains a GUID RegDBKeyExist returns -1.
Here is the code I have tried, I checked that the function would return a 1 by looking for "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"
Has anyone else run into this issue with an InstallScript project in InstallShield 2013 professional SP1?
I have been trying to remove a program within an InstallScript project. Currently I look for the GUID within HKEY_LOCAL_MACHINE, but every time I send a key that contains a GUID RegDBKeyExist returns -1.
Here is the code I have tried, I checked that the function would return a 1 by looking for "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"
Has anyone else run into this issue with an InstallScript project in InstallShield 2013 professional SP1?
//doesn't work
//registry_key = @old_reg_key;
//registry_key = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{b0454189-c155-4f7b-a98d-dcc772213c6b}";
//registry_key = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{b0454189-c155-4f7b-a98d-dcc772213c6b}\\";
//registry_key = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{B0454189-C155-4F7B-A98D-DCC772213C6B}";
//HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A2122A9C-A699-4365-ADF8-68FEAC125D61} this was for reference to make sure the key was right
registry_key = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{A2122A9C-A699-4365-ADF8-68FEAC125D61}";
//does work
//registry_key = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
nSize = -1;
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
root_key = RegDBGetDefaultRoot();
result = RegDBKeyExist(registry_key);
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 14, 2014
12:00 PM
Everything is hunkie-dorie now. Since the system I was checking had a 64bit OS I needed to include
REGDB_OPTIONS = REGDB_OPTIONS | REGDB_OPTION_WOW64_64KEY;I really wish it was posted in the help documentation for RegDBKeyExist function
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 14, 2014
01:08 PM
RegDBKeyExist does mention it.