reg.exe /delete /v /f prompts me yes/no to delete value


  1. Posts : 6
    Windows 7 32 and 64 bit
       #1

    reg.exe /delete /v /f prompts me yes/no to delete value


    The vendor uninstall left 97 registry entries. I am trying to delete them with the reg.exe command. I have Windows 7 64 bit. I have the entries in a text file and I am using this command to delete them... it works good except for 1 which asks me yes/no to delete it.

    for /f "usebackq delims==" %a in (value.txt) do (reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Folders /v "%a" /f)

    Here are a few of the entries in value.txt:
    C:\Program Files (x86)\Nuance\NaturallySpeaking10\tutorial\graphics
    C:\Program Files (x86)\Nuance\NaturallySpeaking10\tutorial\enx\graphics
    C:\Program Files (x86)\Nuance\NaturallySpeaking10\tutorial\enx\demos
    C:\Program Files (x86)\Nuance\NaturallySpeaking10\tutorial\enx\built\standard\web
    C:\Program Files (x86)\Nuance\NaturallySpeaking10\tutorial\enx\built\standard\getstarted
    C:\Program Files (x86)\Nuance\NaturallySpeaking10\tutorial\enx\built\standard\email
    C:\Program Files (x86)\Nuance\NaturallySpeaking10\tutorial\enx\built\standard\dictation
    C:\Program Files (x86)\Nuance\NaturallySpeaking10\tutorial\enx\built\standard\correction
    C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Dragon Medical 10.1
    C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Dragon Medical 10.1\Dragon Medical Tools
    C:\ProgramData\Nuance\NaturallySpeaking10\Data\enx
    C:\ProgramData\Nuance\NaturallySpeaking10\Data\enx\samplecommands
    C:\ProgramData\Nuance\NaturallySpeaking10\Data
    C:\ProgramData\Nuance\NaturallySpeaking10\RoamingUsers
    C:\ProgramData\Nuance

    Any idea why the force option works on some but not all entries? Once I type Y and enter it deletes the key.

    (reg delete HKLM\SOFTWARE\Wow6432Node\Voice\SpeechRecognition\Engine\" /f)
    Permanently delete the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Voice\SpeechRecognition\Engine" /f (Yes/No)?

    (reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Folders /v "C:\Program Files (x86)\Nuance\NaturallySpeaking10\Program\lhsp\rsstdv2\enu\" /f)
    Delete the registry value C:\Program Files (x86)\Nuance\NaturallySpeaking10\Program\lhsp\rsstdv2\enu" /f (Yes/No)?
      My Computer


  2. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #2

    umphorton said:
    (reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Folders /v "C:\Program Files (x86)\Nuance\NaturallySpeaking10\Program\lhsp\rsstdv2\enu\" /f)
    Delete the registry value C:\Program Files (x86)\Nuance\NaturallySpeaking10\Program\lhsp\rsstdv2\enu" /f (Yes/No)?
    Interesting. I was able to replicate your problem, and from my testing it appears that the Reg command will always prompt you yes/no when deleting a registry value with a name that ends in a backslash. And this is regardless of whether the value exists or not: any value ending in a backslash will prompt you yes/no.

    umphorton said:
    Once I type Y and enter it deletes the key.
    Not for me. Whether the key being deleted exists or not, I always receive the same error message:

    C:\>reg delete "HKCU\test" /v "Test\Value\" /f
    Delete the registry value Test\Value" /f (Yes/No)? y
    ERROR: The system was unable to find the specified registry key or value.

    and the registry value is not deleted.

    I was able to overcome the problem by doubling up the last backslash in the Reg command. Backslashes anywhere else in the value name should not be doubled.

    C:\>reg delete "HKCU\test" /v "Test\Value\\" /f
    The operation completed successfully.

    This successfully deletes the value of "Test\Value\" under the key of "HKCU\test".
      My Computer


  3. Posts : 6
    Windows 7 32 and 64 bit
    Thread Starter
       #3

    I will give that a try... Thanks.
      My Computer


  4. Posts : 6
    Windows 7 32 and 64 bit
    Thread Starter
       #4

    That was my issue. Thanks again.
      My Computer


 

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

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