Create a .reg file to add a key

Hey Guys,

I've tried this before with little success and finally gave up because it was faster to do it by hand.  

This time I WILL PREVAIL!!! :P

Anyway - I want to create a .reg file that will add a key to the registry to keep RAS alive when a user logs out.  This is to help me join virtual machines to the domain through a PPTP tunnel.

Here's the edit:
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon
KeepRasConnections REG_SZ
Range: 0 or 1
Default: 0 (disabled)

I want it to be "1"

I exported the path but that includes a ton of other keys that I don't necessarily want to change/add.  I think it'd be safer I think to just add this one entry.  

Who is Participating?
flubbsterConnect With a Mentor Commented:
Create this in Notepad and save with a .reg extension. Make sure there is an extra carriage return at the end of the file. Use everything between the lines.

Windows Registry Editor Version 5.00
[HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]
"KeepRasConnections "=dword :1

athomsfereConnect With a Mentor Commented:
To add one key value, you want to use reg add from either the command line or a batch file.

This should do it for you.

reg add HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon /v KeepRasConnections /d "0" /f

Open in new window

That will create a string subkey in Winlogin named KeepRasAlive with a value of 0.
ttist25Author Commented:
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.