Results 1 to 5 of 5

Thread: [RESOLVED] Registry Editor (Change Default Type from REG_SZ to REG_EXPAND_SZ)

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2017
    Posts
    905

    Resolved [RESOLVED] Registry Editor (Change Default Type from REG_SZ to REG_EXPAND_SZ)

    I rarely muck with the registry.

    M$ Registry Editor appear to allow only the Value Name and Value to be modified.
    While the "Type" shows as REG_SZ, I can't find anything to modify the "Type".

    I can create a New Value, and during that creation specifiy the "Type" as REG_EXPAND_SZ and then modify the Name and Value, but this adds under {Default} as a new name.
    The Editor then will NOT let me delete the above {Default} line, so I can change the new line to {Default}.

    What is the Best HOWTO?

    ============ keep getting 503 errors when replying ======
    Did it with CMD:

    Instead of using /v {value name goes here}
    Use /ve {leave this blank} /t REG_EXPAND_SZ /d {data value}

    Thanks to all who took a look see.
    Still would like to know if you can do it through Registry Editor.

    Thanks
    David
    Last edited by vb6forever; Jul 13th, 2024 at 04:36 PM.

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2017
    Posts
    905

    Re: Registry Editor (Change Default Type from REG_SZ to REG_EXPAND_SZ)

    Did it with CMD:

    Instead of using /v {value name goes here}
    Use /ve {leave this blank} /t REG_EXPAND_SZ /d {data value}

    Thanks to all who took a look see.
    Still would like to know if you can do it through Registry Editor.

  3. #3
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,439

    Re: Registry Editor (Change Default Type from REG_SZ to REG_EXPAND_SZ)


  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2017
    Posts
    905

    Re: Registry Editor (Change Default Type from REG_SZ to REG_EXPAND_SZ)

    jdc2000:

    Thanks for your time and the links.

    David

  5. #5
    New Member
    Join Date
    Jul 2024
    Posts
    2

    Re: Registry Editor (Change Default Type from REG_SZ to REG_EXPAND_SZ)

    Sure, David! It seems like you've run into a common problem when trying to modify the "Type" of a registry value directly in the Registry Editor. Unfortunately, the Registry Editor is really limited to directly modifying the "Type" of existing values. However, you've found a workaround using the command line, which is a great approach.

    For those looking for detailed instructions, here's the best method to change the registry value type to `REG_EXPAND_SZ`:

    Step-by-step guide to changing the registry value type

    1. **Open Command Prompt as Administrator:**
    - Press `Win + X` and select `Command Prompt (Admin)`.

    2. **Use the `reg` command to modify the registry:**
    - Use the following command format:
    ```
    reg add "HKCU\Path\To\Your\Key" /ve /t REG_EXPAND_SZ /d "Your data value"
    ```
    - Replace `"HKCU\Path\To\Your\Key"` with the actual path to your registry key.

    - The `/ve` parameter specifies that the default value (`(Default)`) should be modified.

    - The `/t` parameter specifies the type, in this case `REG_EXPAND_SZ`.

    - The `/d` parameter specifies the data value to set.

    Command Example

    If you want to set the default value of a key to type `REG_EXPAND_SZ` with value `C:\Path\To\File`, you would use:

    ```sh
    reg add "HKCU\Software\YourKey" /ve /t REG_EXPAND_SZ /d "C:\Path\To\File"

    Why Use Command Prompt?

    The Command Prompt provides more flexibility and control over registry operations that the GUI Registry Editor may not provide. It allows you to specify the value type directly and handle default values ??efficiently.

    While the Registry Editor has its own limitations, using the Command Prompt can efficiently manage and modify registry values ??of different types. This method ensures that your system configuration is correct and avoids the limitations of GUI tools.

    By following the steps at this link, you will be able to modify registry values ??as needed without running into the limitations of the Registry Editor. Happy tweaking!
    Last edited by joshuaperez47; Jul 29th, 2024 at 05:15 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width