Manipulating Registry from a Batch file

Manipulating Registry from a Batch file

REGEDIT /S addsome.REG                Adds registry settings from a file

REGEDIT /E d:pathfilename.REG "HKEY_XXXXWhatever Key"   Exports a a registry hive to file

Example of a registry import file

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogon]
“AutoAdminLogon”=”1”
“DefaultDomainName”=”LABDOMAIN”
“DefaultUserName”=”user”
“DefaultPassword”=”password”

Deleting a registrykey

[-HKEY_CURRENT_USERDummyTree]      Deletes the entire tree DummyTree

[HKEY_CURRENT_USERDummyTree]       Deletes ValueToBeRemoved from DummyTree
“ValueToBeRemoved”=-

Source

Comments

Leave a Reply

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)