cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MrTarpon
Level 3

Help with RegDBDeleteKey example script

Jump to solution

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;

 

Labels (1)
0 Kudos
(1) Solution
MrTarpon
Level 3

Solved, find the solution for deleting registry keys by using the RemoverRegistry table with a proper entry's.

View solution in original post

0 Kudos

(1) Reply
MrTarpon
Level 3

Solved, find the solution for deleting registry keys by using the RemoverRegistry table with a proper entry's.

0 Kudos