Solved

Create a .reg file to add a key

Posted on 2012-04-05
3
786 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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks!
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now