# How to add a registry key with a batch file?



## chaos40

How do you add a registry key to a computer using a batch file?

Thanks!


----------



## FrankenPC

REGEDIT /S {enter full path and regfile name here}


----------



## chaos40

Cool! Thanks!

I also found that it can be done with a VBS file....

dim oShell
set oShell = Wscript.CreateObject("Wscript.Shell")
oShell.RegWrite "HKLM\\SYSTEM\\CurrentControlSet\\Services\\RasMan \\PPP\\EAP\\13\\MaxTLSMessageLength", 64000, "REG_DWORD"
Set oShell = Nothing


----------



## FrankenPC

Here is another interesting tip. Take a .REG file and a registry key in that file and put a "-" (minus) in front of the key. When you run it, it will delete that registry entry.


----------



## chaos40

Another great tip! Thanks.


----------



## SoBe8503

Quote:


Originally Posted by *FrankenPC* 
Here is another interesting tip. Take a .REG file and a registry key in that file and put a "-" (minus) in front of the key. When you run it, it will delete that registry entry.

Wow, thats actually really useful

+REPS!


----------

