• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 877
  • Last Modified:

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.  

TIA!
0
ttist25
Asked:
ttist25
2 Solutions
 
athomsfereCommented:
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.
0
 
flubbsterCommented:
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

 ===========================================================
0
 
ttist25Author Commented:
Thanks!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now