Code: Select all
Option Explicit
If Not WScript.Arguments.Named.Exists("elevate") Then
CreateObject("Shell.Application").ShellExecute WScript.FullName _
, """" & WScript.ScriptFullName & """ /elevate", "", "runas", 1
WScript.Quit
End If
Dim objShell
Set objShell = CreateObject( "WScript.Shell" )
Dim strDelete
strDelete = objShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Prefs\my_key")
WScript.echo(strDelete)
objShell.RegDelete "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Prefs\my__key"
WScript.Quit
1) Error 1720. There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action ExecuteScriptCode script error -2146827788, Microsoft VBScript runtime error: Variable is undefined: 'WScript' Line 2, Column 1,
OR below when I remove Administrator Login code.
2) Product: MyProduct -- Error 1720. There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action ExecuteScriptCode script error -2147024894, WshShell.RegRead: Invalid root in registry key "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Prefs\". Line 5, Column 1,
Can you please guide me best solution to handle this.Please help me with the throughout procedure in order to achieve the same.
I simply want to remove registry key created by my Java Application and want to remove it while uninstall and not during Upgrade.Please Help.
FOLLOW US
Get the latest news in Application Packaging