"REG DELETE" from CMD prompt. Ran into a problem...


  1. Posts : 107
    Windows
       #1

    "REG DELETE" from CMD prompt. Ran into a problem...


    Trying to use the following syntax from the cmd prompt:

    REG DELETE HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT /v <two words seperated by a space> /t REG_MULTIZ_SZ /d <a specific line of text contained within the reg_multi_sz string>


    what's the correct syntax since when I write the above I get a 'syntax error'?

    To clarify: the REG_MULTI_SZ string I'm trying to modify has a name comprised of two words separated by a space.

    Further: It contains multiple entries. I'm trying to delete one specific entry from within it.

    Even further: Even if it were to contain only one entry, I'm trying to delete that specific entry while leaving the actual REG_MULTI_SZ string in existence, but empty.
      My Computer


  2. Posts : 8,057
    windows 10
       #2

    It dangerous to do this from the cmdline if you are unsure why cant you goto regedit and do it?
      My Computer


  3. Posts : 107
    Windows
    Thread Starter
       #3

    Samuria said:
    It dangerous to do this from the cmdline if you are unsure why cant you goto regedit and do it?
    Automating a number of commands.

    Need to use the command line for this.

    I've got the necessary backups in place.
      My Computer


  4. Posts : 8,057
    windows 10
       #4

    Sending abusive messages to people replying to your thread isnt the way to get a response or help from anyone if you cant conduct yourself in the proper manner please refrain from posting
      My Computer


  5. Posts : 5,442
    Windows 11 Home
       #5

    You do not need to delete it, when you add the new entry, it gets overwritten. Insert it between ""
    Code:
    reg add "HKLM\System\CurrentControlSet\Control\Session Manager" /v "BootExecute" /t REG_MULTI_SZ /d "autocheck autochk *" /f
    To make the empty entry, just input empty paragraphs ""
    Code:
    reg add "HKLM\System\CurrentControlSet\Control\Session Manager" /v "BootExecute" /t REG_MULTI_SZ /d "" /f
    For the record, to delete entry:
    Code:
    reg delete "HKLM\System\CurrentControlSet\Control\Session Manager" /v "BootExecute" /f
    You can also export reg key and convert it to bat via Reg Converter to find the correct syntax.
      My Computer


  6. Posts : 107
    Windows
    Thread Starter
       #6

    TairikuOkami said:
    You do not need to delete it, when you add the new entry, it gets overwritten. Insert it between ""
    Code:
    reg add "HKLM\System\CurrentControlSet\Control\Session Manager" /v "BootExecute" /t REG_MULTI_SZ /d "autocheck autochk *" /f
    To make the empty entry, just input empty paragraphs ""
    Code:
    reg add "HKLM\System\CurrentControlSet\Control\Session Manager" /v "BootExecute" /t REG_MULTI_SZ /d "" /f
    For the record, to delete entry:
    Code:
    reg delete "HKLM\System\CurrentControlSet\Control\Session Manager" /v "BootExecute" /f
    You can also export reg key and convert it to bat via Reg Converter to find the correct syntax.
    Thanks a lot Tairiku! That's exactly the information I was looking for.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 07:15.
Find Us




Windows 10 Forums