Summary
Delete a 64 bit created registry using installscript Customaction
Cause
When user try to delete a registry using installscript Custom action by default it will check under WOW6432 location and it will fail to delete the registry
Resolution
To delete a 64 bit registry using installscript first we should disable wow64 redirection,
#define TITLE_TEXT "RegDBDeleteKey Example"
// Include Ifx.h for built-in InstallScript function prototypes.
#include "Ifx.h"
export prototype ExFn_RegDBDeleteKey(HWND);
function ExFn_RegDBDeleteKey(hMSI)
STRING szKey, szMsg, svLogFile;
begin
REGDB_OPTIONS =REGDB_OPTIONS | REGDB_OPTION_WOW64_64KEY;
Disable(WOW64FSREDIRECTION);
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
szKey = "SOFTWARE\\ISTest";
//RegDBDeleteKey ("SOFTWARE\\ISTest") ;
if (RegDBDeleteKey (szKey) < 0) then
MessageBox ("RegDBDeleteKey failed.", SEVERE);
else
SprintfBox (INFORMATION, TITLE_TEXT, "%s successfully deleted.", szKey);
endif;
Enable(WOW64FSREDIRECTION);
end;
Reference:
Click here for more information about the InstallScript REGDB_OPTIONS function.
Click here for more information about the InstallScript Enable function.
Click here for more information about the InstallScript Disable function.
A ZIP file containing a sample project is attached. The sample project is configured to execute the InstallScript custom action during the Execute Sequence of the install with a condition of REMOVE=ALL . The condition configures the custom action to only run during Uninstallation
Related Articles
Create a 64-bit Windows Registry Entry via an InstallScript Custom Action 9Number of Views Delete/Disable a Scheduled Task Using an InstallScript Custom Action 5Number of Views Register Assembly (RegAsm.exe) For Both 32 & 64 Bit Using a Custom Action 7Number of Views Create a Windows Registry Entry with Type REG_NONE for Windows File Type Association 6Number of Views Access SUPPORTDIR from an InstallScript Custom Action 6Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago