Creating Batch File to Set Several Registry Settings

I would like to create a batch file to set various Registry settings instead of setting them individually.  

One of the settings is to disable Autorun and the script would be:


Do I need to include all the other items within the CDrom registry area as well (i.e., AutoRunAlwaysDisable, DependOnGroup, DisplayName, etc.)?  I want to make sure I only change AutoRun and nothing else.
Who is Participating?
David Johnson, CD, MVPConnect With a Mentor OwnerCommented:
use a bunch of reg add statements in your batch file, just use what you've changed and nothing else.

reg add <KeyName> [{/v ValueName | /ve}] [/t DataType] [/s Separator] [/d Data] [/f]
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.