RegDBGetUninstCmdLine

InstallShield 2016 » InstallScript Language Reference

Project • For InstallScript MSI and Basic MSI projects, it is recommended that you use the Registry view in InstallShield instead of creating registry keys and values through InstallScript code. Handling all of your registry changes in this way allows for a clean uninstallation through the Windows Installer service.

The RegDBGetUninstCmdLine function gets the registered command line for the uninstallation that is specified by szUninstallKey and returns the command line in svUninstCmdLine.

Note • The InstallScript engine currently does not support writing or reading Add or Remove Programs information for a product in the 64-bit part of the registry. Therefore, using the REGDB_OPTION_WOW64_64KEY option with the REGDB_OPTIONS system variable is not supported for this registry function. Enabling the REGDB_OPTION_WOW64_64KEY option has no effect on where registry entries are created by this function.

Syntax

RegDBGetUninstCmdLine ( szUninstallKey, svUninstCmdLine );

Parameters

RegDBGetUninstCmdLine Parameters

Parameter

Description

szUninstallKey

Specifies the name of a subkey under the target registry's <root key>\Software\Microsoft\Windows\CurrentVersion\Uninstall key; the function first checks for the subkey under the root key HKEY_CURRENT_USER, and if it does not find the subkey there, it checks under HKEY_LOCAL_MACHINE. For setups created with InstallShield Professional 5.53 or earlier, this is typically the name of the application; for setups created with InstallShield Professional 6.0 or later, this is the application's product GUID including the surrounding braces ({}).

svUninstCmdLine

Returns the uninstallation command line that is specified in szUninstallKey's UninstallString value's data.

Return Values

RegDBGetUninstCmdLine Return Values

Return Value

Description

>= ISERR_SUCCESS

The function successfully got the command line.

< ISERR_SUCCESS

The function failed to get the command line.

Additional Information

By default, any text that is surrounded by angle brackets—for example, "<my registry entry text>"—in this function’s string arguments is interpreted as a text substitution and is processed accordingly. To disable text substitution processing for the string arguments of registry functions, call Disable with the REGISTRYFUNCTIONS_USETEXTSUBS argument.