Question Locked

batch scripting registry edits

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello again,

i'm working on designing a batch file that will modify the registry to clean up some broken links on the start menu. i've got the batch file to work correctly except for 1 small issue that i was told needs to be resolved.

when the batch file runs it prompts the user to select yes or no to allow the change to registry.

the Question:

is there a command i can use to hide that selection box and automatically select yes when that prompt would appear?

Thanks in advance.

4 replies

by robo_dev

wscript is the best method to make regedits, in my opinion.

Post your code and we'll be glad to tell you where to go, programmatically.

by rob miners

you can place this at the beginning of the command line and then leave a space.

echo y|

eXample:

echo y| reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableTaskMgr

by ic-it

If it is a regedeit.exe call then the info below will help, use the Silent switch;

Copied from;
http://support.microsoft.com/kb/310516

Regedit.exe supports a /s command-line switch to not display these messages. For example, to silently run the .reg file (with the /s switch) from a login script batch file, use the following syntax:
regedit.exe /s path of .reg file

This discussion is closed to new replies.