Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
Credits 8 Posts 2 Joined 2009-01-14 13:51 17-year member UID 136653 Gender Male
Status Offline
————————————————————————————————
Moved from DOS Troubleshooting & Problem Discussion (Answer Room)
Obviously posted in the wrong section. Since this is a new forum user, no penalty will be given for now. Please pay attention in the future.
—Administrator
————————————————————————————————
@echo off
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v Ravtary
This is a batch file I wrote myself, but when it runs, I have to press Y before it will execute. I want it to run automatically, without needing to press Y.
Please, experts, help me~~~~~~~~
Credits 9,023 Posts 5,017 Joined 2007-05-31 19:39 19-year member UID 89899 Gender Male
Status Offline
Read the help more
C:\Test>reg delete /?
Console Registry Tool for Windows - version 3.0
Copyright (C) Microsoft Corp. 1981-2001. All rights reserved
REG DELETE KeyName
KeyName FullKey
Machine Name of remote machine - omitting defaults to the current machine
Only HKLM and HKU are available on remote machines
FullKey ROOTKEY\SubKey
ROOTKEY
SubKey The full name of a registry key under the selected ROOTKEY
ValueName The value name, under the selected Key, to delete
When omitted, all subkeys and values under the Key are deleted
/ve delete the value of empty value name <no name>
/va delete all values under this key /f Forces the deletion without propmt
Examples:
REG DELETE HKLM\Software\MyCo\MyApp\Timeout
Deletes the registry key Timeout and its all subkeys and values
REG DELETE \\ZODIAC\HKLM\Software\MyCo /v MTU
Deletes the registry value MTU under MyCo on ZODIAC
Credits 1,039 Posts 897 Joined 2009-03-01 15:34 17-year member UID 140302 Gender Male From 在地狱中仰望天堂
Status Offline
/f means no confirmation is needed, >nul suppresses the "The operation completed successfully" output. 2>nul suppresses error output if the key value cannot be deleted or does not exist.