HEELPBOOK - Add and delete registry keys using .reg files (Windows OS) ################### A .reg file has the following syntax: RegistryEditorVersion #Blank line [RegistryPath1] "DataItemName1?="DataType1:DataValue1? "DataItemName2?="DataType2:DataValue2? #Blank line [RegistryPath2] "DataItemName3?="DataType3:DataValue3? ########## Example Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Test] @="Default Value" "REG_SZ - String Value"="String Value" "REG_BINARY - Binary Value"=hex:01,02,03,04 "REG_DWORD - DWORD Value"=dword:00000001 "REG_EXPAND_SZ - Expandable String Value"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6D,00,52,00,6F,00,6F,00,74,00,25,00,5C,00,53,00, 79,00,73,00,74,00,65,00,6D,00,33,00,32,00,00,00 "REG_MULTI_SZ - Multi-String Value"=hex(7):4D,00,75,00,6C,00,74,00,69,00,2D,00,53,00,74,00,72,00,69,00,6E,00,67,00,20,00,56,00,61,00,6C,00,75,00,65,00,00,00 [HKEY_LOCAL_MACHINE\Software\Test] "TestValue"=- [-HKEY_LOCAL_MACHINE\Software\Test] ########## Variants hex = hex(3) so instead of hex:01,02,03,04 you can write: hex(3):01,02,03,04 REG_SZ = hex(1) so instead of "String Value" you can write: hex(1):53,00,74,00,72,00,69,00,6E,00,67,00,20,00,56,00,61,00,6C,00,75,00,65,00,00,00 dword = hex(4) so instead of writing dword:1 you can write: hex(4):01,00,00,00 hex(0) = REG_NONE hex(1) = REG_SZ hex(2) = REG_EXPAND_SZ hex(3) = REG_BINARY hex(4) = REG_DWORD hex(5) = REG_DWORD_BIG_ENDIAN hex(6) = REG_LINK hex(7) = REG_MULTI_SZ hex(8) = REG_RESOURCE_LIST hex(9) = REG_FULL_RESOURCE_DESCRIPTOR hex(a) = REG_RESOURCE_REQUIREMENTS_LIST hex(b) = QWORD @ = (Default) (Data Type = REG_SZ) ; = Comment ############ ARTICLE INFO ############# Article Month: December Article Date: 18/12/2012 Permalink: http://heelpbook.altervista.org/2012/add-delete-registry-keys-using-reg-files-windows-os/comment-page-1/ Source: http://staraphd.blogspot.it/2011/01/add-delete-registry-keys-using-reg.html Language: English View more articles on: http://www.heelpbook.net/ Follow us on Facebook: http://it-it.facebook.com/pages/HeelpBook/100790870008832 Follow us on Twitter: https://twitter.com/#!/HeelpBook Follow us on RSS Feed: http://feeds.feedburner.com/Heelpbook Follow us on Delicious: http://delicious.com/heelpbook Linkedin: http://it.linkedin.com/pub/stefano-maggi/27/73a/b20 Google+ : https://plus.google.com/116990277568167008289/posts