- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Help with RegDBDeleteKey example script
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
Hi,
Need some help cause it is not clear to me where I put my "MyTestKey.reg" key in this script to let it work?
/*--------------------------------------------------------------*\
*
* InstallShield Example Script
*
* Demonstrates the RegDBDeleteKey function.
*
* This example creates and then deletes a registry key.
* Almost all of the examples provided with the registry functions
* use this function to delete a key. Please refer to those
* examples for more information.
*
\*--------------------------------------------------------------*/
#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, szClass, szKeyRoot, szMsg, svLogFile;
NUMBER nResult1, nResult2;
begin
// Set up parameters for call to RegDBCreateKeyEx.
szKey = "DeleteMeKey";
szClass = "";
// Create a key with no class value.
if (RegDBCreateKeyEx (szKey, szClass) < 0) then
MessageBox ("RegDBCreateKeyEx failed.", SEVERE);
abort;
else
SprintfBox (INFORMATION, TITLE_TEXT, "%s successfully created.", szKey);
endif;
// Call RegDBDeleteKey to delete the key just created.
if (RegDBDeleteKey (szKey) < 0) then
MessageBox ("RegDBDeleteKey failed.", SEVERE);
else
SprintfBox (INFORMATION, TITLE_TEXT, "%s successfully deleted.", szKey);
endif;
end;
- Tags:
- RegDBDeleteKey
- script
Solved, find the solution for deleting registry keys by using the RemoverRegistry table with a proper entry's.
Solved, find the solution for deleting registry keys by using the RemoverRegistry table with a proper entry's.