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
- :
- UAC and patches
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
‎Aug 23, 2009
11:43 PM
UAC and patches
I have the following script in my OnPatchUIAfter() function:
RegDBSetDefaultRoot (HKEY_LOCAL_MACHINE);
szKey = "SOFTWARE\\MyCompanyName\\MyProductName";
szName = "CurrentVersion";
nvType = REGDB_STRING;
szValue = IFX_PRODUCT_VERSION;
RegDBSetKeyValueEx ( szKey, szName, nvType, szValue, nSize );
When running the patch on Vista, it never performs this function correctly. The RegDBSetKeyValueEx returns a negative value. If I execute the update.exe as "run as administrator" everything works fine.
Can someone tell me what is going wrong?
RegDBSetDefaultRoot (HKEY_LOCAL_MACHINE);
szKey = "SOFTWARE\\MyCompanyName\\MyProductName";
szName = "CurrentVersion";
nvType = REGDB_STRING;
szValue = IFX_PRODUCT_VERSION;
RegDBSetKeyValueEx ( szKey, szName, nvType, szValue, nSize );
When running the patch on Vista, it never performs this function correctly. The RegDBSetKeyValueEx returns a negative value. If I execute the update.exe as "run as administrator" everything works fine.
Can someone tell me what is going wrong?
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 24, 2009
01:09 AM
Your update.exe is not elevated and you cannot write on HKLM on vista unless you have admin rights. So, you have to elevate your update setup. Check that whether yout update.exe file has a shield icon?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 24, 2009
01:19 AM
My update.exe does have the shield icon.
I am logged onto vista as a member of the administrator group.
How do I go about elevating the privileges?
I am logged onto vista as a member of the administrator group.
How do I go about elevating the privileges?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 24, 2009
02:02 AM
May be its writing in the program files because the folders may have some special permissions provided by your original setup. You must run it as asministrator to write in HKLM on win Vista.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 24, 2009
02:05 AM
Even though "previous1" when installed could write to the HKLM path?
For logic sake, I have taken out the step that writes my custom information to HKLM. I can install the patch but I still have an issue that there are now two entries in add/remove programs for my product.
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BD76AECE-6647-4297-8251-817B1711D1BA}
Display Version = correct updated patch version
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield_{BD76AECE-6647-4297-8251-817B1711D1BA}
Display Version = version of previous1 that should have been updated.
For logic sake, I have taken out the step that writes my custom information to HKLM. I can install the patch but I still have an issue that there are now two entries in add/remove programs for my product.
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BD76AECE-6647-4297-8251-817B1711D1BA}
Display Version = correct updated patch version
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield_{BD76AECE-6647-4297-8251-817B1711D1BA}
Display Version = version of previous1 that should have been updated.