cancel
Showing results for 
Search instead for 
Did you mean: 

Registry Key Delete Code via On Begin Install tab..

Former Member
0 Kudos

Good Day,

I am attempting to delete a registry key in the "On Begin Install" tab. I have tried several iterations of code attempting to determine the correction line. I was hoping someone could help...

Here are a couple of the iterations i have tried...

If NwEngine.Shell.RegKeyExist("HKCU\SOFTWARE\SAP") Then

NwEngine.Shell.DeleteRegValue "HKCU\SOFTWARE\SAP"

also tried .. NwEngine.Shell.DelRegValue "HKCU\SOFTWARE\SAP"

and .... NwEngine.Shell.DelRegValue ("HKCU\SOFTWARE\SAP")

as well as a couple of other iterations. I have also check the help under Packaging Event Scripting Samples, but there was not a entry for registry key deletion. Any help would be appreciated.

Thanks

Z

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

use the undocumented function:

 NwEngine.Shell.DeleteRegKey (strRegkey) 

 If NwEngine.Shell.RegKeyExist("HKCU\SOFTWARE\SAP") Then
   NwEngine.Shell.DeleteRegKey ("HKCU\SOFTWARE\SAP") 
end If 

But beware of useing this funktion and be shure that you have select the right Key entry....

Answers (0)