Solved

Create a .reg file to add a key

Posted on 2012-04-05
3
810 Views
Last Modified: 2012-06-22
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
Comment
Question by:ttist25
3 Comments
 
LVL 14

Assisted Solution

by:athomsfere
athomsfere earned 250 total points
ID: 37811450
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
 
LVL 30

Accepted Solution

by:
flubbster earned 250 total points
ID: 37811594
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
 
LVL 1

Author Closing Comment

by:ttist25
ID: 37816965
Thanks!
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Can I legally transfer my OEM version of Windows to another PC?  (AKA - Can I put a new systemboard in my OEM PC?) Few of us are both IT and legal experts but we all have our own views of Microsoft's licensing rules and how they apply.  There are…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question