Kaseya Community

Adding registry DWORD

  • Hi,

    I'm writing (trying to, actually) a script to create a new dword in registry and assign a value.

    tried
    1. running this in execute shell command as system and user -
    reg add "HKCU\Software\Microsoft\Office\11.0\Outlook\Options\General" /v "DelegateWastebasketStyle" /t REG_DWORD /d 4 /f
    2. created this as a reg file and ran that reg file using execute file / execute shell command

    nothing works. when running these on the pc physically, it works fine. Anything I'm missing / can try ?

    Thanks in advance,

    Legacy Forum Name: Adding registry DWORD,
    Legacy Posted By Username: Mkris
  • Because it's going into the HK Current User hive, you would have to run it as the user, rather than the system.

    you've created a reg file, did you try running it with regedit /s ?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Charles.IN
  • Have you tried using the "set registry value" option that is available in a script?

    more info can be found here :
    http://support.microsoft.com/kb/202517


    Script Name: Deleted Items from a shared mailbox go to the wrong folder in Outlook
    Script Description: When using Microsoft Outlook 2003, you delete items from a Mailbox folder of another user where you have deletion privileges, and the deleted items go into your Deleted Items folder rather than that of the mailbox owner.

    IF User Is Logged In
    Parameter 1 :
    THEN
    Set Registry Value
    Parameter 1 : HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Options\General\DelegateWastebasketStyle
    Parameter 2 : 4
    Parameter 3 : REG_DWORD
    OS Type : 0
    ELSE



    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Martijn Frickel
  • Tried that but it needs the registry entry first so that i t can update the value.

    Martijn Frickel
    Have you tried using the "set registry value" option that is available in a script?

    more info can be found here :
    http://support.microsoft.com/kb/202517


    Script Name: Deleted Items from a shared mailbox go to the wrong folder in Outlook
    Script Description: When using Microsoft Outlook 2003, you delete items from a Mailbox folder of another user where you have deletion privileges, and the deleted items go into your Deleted Items folder rather than that of the mailbox owner.

    IF User Is Logged In
    Parameter 1 :
    THEN
    Set Registry Value
    Parameter 1 : HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Options\General\DelegateWastebasketStyle
    Parameter 2 : 4
    Parameter 3 : REG_DWORD
    OS Type : 0
    ELSE



    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Mkris
  • This worked - tried it as a user and works fine. Wondering how i missed such a simple thing.. Smile

    Charles.IN
    Because it's going into the HK Current User hive, you would have to run it as the user, rather than the system.

    you've created a reg file, did you try running it with regedit /s ?


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