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

umphorton

New member
Local time
5:56 PM
Messages
6
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 My Computer

At a glance

Windows 7 32 and 64 bit
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dell
OS
Windows 7 32 and 64 bit
(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.

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 My Computer

At a glance

Windows 10, Windows 8.1 Pro, Windows 7 Profes...
Computer type
PC/Desktop
OS
Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
I will give that a try... Thanks.
 

My Computer My Computer

At a glance

Windows 7 32 and 64 bit
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dell
OS
Windows 7 32 and 64 bit
That was my issue. Thanks again.
 

My Computer My Computer

At a glance

Windows 7 32 and 64 bit
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dell
OS
Windows 7 32 and 64 bit
Back
Top