Batch file to add a value to a Registry Key

Ones_Zeros

Member
Join Date
Feb 2014
Location
at work
Posts
367
Hello
I was needing some help to writing a batch file that will add a value of "1"
into a Windows "String Value" Registry key.

The registry location is
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon
The key that i need to modify the value of is AutoAdminLogon this value
is "0" and I need the script to change this to a "1"

I have several field computers that I want to log on automatically and this would save me some time by setting up this batch file.

I have the other keys that I have exported from this registry location that i have made additions and I can add these by clicking the registry export file. It works fine.

If these could be included into the same batch file would be great but doesn't have to be. these keys are not already created as the batch file would have to create the key and then add the value to the key.

- DefaultPassword
- DefaultDomainName
- DefaultUserName
 
You can add all the values to one .reg file

It will update each key to match whatever you have in the file, and create the ones that don't exist.
 
Set one PC up the way you like, export the winlogon branch. and just remove the entries for whatever lines you don't want/need.
 
Is is best to export just the 4 registry keys that I need to add or modify or the winlogon branch? just curious.

I exported the 4 keys from one PC and imported them into a different pc and it worked but i got an error saying one of the keys was in use but it changed the AutoAdminLogon valve to "1" anyway.


thanks,
 

Similar Topics

Hello I have a folder that has txt files added as reports is ran. By default these reports is saved as a .txt file and no way to change this...
Replies
25
Views
11,962
I need to write a simple Batch file Copy.BAT to copy a file. lets call the original file c:\folder\FileA.xlsx and the New one...
Replies
5
Views
1,858
Gday all, I'm currently working on a system that is using FTView ME running on a PV1500+ version 6.0. I have a datalog model created and all...
Replies
1
Views
3,490
First off, I am new to this forum so please bear with me. We currently are running several different brands of plcs and the one that gives the...
Replies
3
Views
2,678
I am trying to run a batch file from my VersaView Application to copy log files over to a USB Drive. I am unable to get the file to run...
Replies
0
Views
3,202
Back
Top Bottom