Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Need a script to change the value of Registry Dword

Posted on 2014-02-19
7
Medium Priority
?
1,476 Views
Last Modified: 2014-02-25
I am looking for a script to modify the Reg_Dword value for the following registry Key as 2:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Lsa\restrictanonymous
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Lsa\restrictanonymoussam

Thnx
0
Comment
Question by:jmohan0302
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 85

Accepted Solution

by:
oBdA earned 2000 total points
ID: 39871702
Plain batch (save as Whatever.cmd); and the correct key btw is ...\CurrentControlSet\Control\Lsa:
reg.exe add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa" /v "restrictanonymous" /t REG_DWORD /d 2 /f
reg.exe add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa" /v "restrictanonymoussam" /t REG_DWORD /d 2 /f

Open in new window

0
 

Author Comment

by:jmohan0302
ID: 39872326
I ran the above command, but the value didnt change....
Also want to know how to do this by vbscript
Thnx
0
 
LVL 85

Expert Comment

by:oBdA
ID: 39872552
Works just fine here. Any error message?
Note that as this is in HKLM, you need to run this elevated if UAC is active.
What's the output of
reg.exe query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa"

Open in new window

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:jmohan0302
ID: 39872981
Below is the output of the reg query, you could see the value of DWORD is not changed. Thnx

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Mohan>cd\

C:\>reg.exe query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa"

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
    auditbaseobjects    REG_DWORD    0x0
    auditbasedirectories    REG_DWORD    0x0
    crashonauditfail    REG_DWORD    0x0
    fullprivilegeauditing    REG_BINARY    00
    Bounds    REG_BINARY    0030000000200000
    LimitBlankPasswordUse    REG_DWORD    0x1
    NoLmHash    REG_DWORD    0x1
    Notification Packages    REG_MULTI_SZ    DPPassFilter\0scecli
    Security Packages    REG_MULTI_SZ    kerberos\0msv1_0\0schannel\0wdigest\0ts
pkg\0pku2u
    Authentication Packages    REG_MULTI_SZ    msv1_0
    LsaPid    REG_DWORD    0x270
    SecureBoot    REG_DWORD    0x1
    ProductType    REG_DWORD    0x6
    disabledomaincreds    REG_DWORD    0x0
    everyoneincludesanonymous    REG_DWORD    0x0
    forceguest    REG_DWORD    0x0
    restrictanonymous    REG_DWORD    0x0
    restrictanonymoussam    REG_DWORD    0x1

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\AccessProviders
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Audit
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Credssp
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Data
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\GBG
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\JD
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Kerberos
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Skew1
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\SSO
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\SspiCache

C:\>
0
 
LVL 85

Expert Comment

by:oBdA
ID: 39873203
Any error message when running the "reg add" commands?
Did you run the "reg add" commands from an elevated prompt?
0
 

Author Comment

by:jmohan0302
ID: 39873573
No error message. Yes ran from elevated command prompt
0
 
LVL 85

Expert Comment

by:oBdA
ID: 39873615
Can you please repost the exact command you ran to set the values?
Note that in your question, you had an incorrect registry path; check if the values appear directly under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Lsa (note that there's no key "Control" between "CurrentControlSet" and "Lsa"). If so, correct the path and try again.
0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

610 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