Kaseya Community

Setting the (default) value of a registry key

  • Hi,
    I'm trying to use "Set Registry Value" to set the default value of a key but it seems to create a second "(default)" with the value I want leaving the original "(default)" with no value set...anyone have any ideas??

    My Script:
    Script Name: Enable "Run As" for MSI files
    Script Description: Enable "Run as" for MSI files when right clicking on them the same way as other executable files have the option.

    IF True
    THEN
    Set Registry Value
    Parameter 1 : HKEY_CLASSES_ROOT\Msi.Package\shell\Runas\(Default)
    Parameter 2 : Install &as...
    Parameter 3 : REG_SZ
    OS Type : 0
    Set Registry Value
    Parameter 1 : HKEY_CLASSES_ROOT\Msi.Package\shell\Runas\Command\(Default)
    Parameter 2 : msiexec /i "%1"
    Parameter 3 : REG_SZ
    OS Type : 0
    ELSE



    Legacy Forum Name: Setting the (default) value of a registry key,
    Legacy Posted By Username: richardprice
  • Had a thought as I posted and have solved it: just left out the (default) in each line...

    Script Name: Enable "Install As" for MSI files
    Script Description: Enable "Run as" for MSI files when right clicking on them the same way as other executable files have the option.

    IF True
    THEN
    Set Registry Value
    Parameter 1 : HKEY_CLASSES_ROOT\Msi.Package\shell\Runas\
    Parameter 2 : Install &as...
    Parameter 3 : REG_SZ
    OS Type : 0
    Set Registry Value
    Parameter 1 : HKEY_CLASSES_ROOT\Msi.Package\shell\Runas\Command\
    Parameter 2 : msiexec /i "%1"
    Parameter 3 : REG_SZ
    OS Type : 0
    ELSE



    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: richardprice