Adding A registry key

WellingtonIS
WellingtonIS used Ask the Experts™
on
I'm trying to add a reg_sz called ScreensaverGracePeriod with a 900 seconds entered.  I tried this but it's adding the entire key and I just want to add the screensavergraceperiod

REG ADD "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogin" /v REG_SZ/ScreenSaverGraceperiod /d 900
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Try this instead:

REG ADD "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogin" /v ScreenSaverGraceperiod /t REG_SZ /d 900 /f

Author

Commented:
That's adding the key again.  here's a picture. What I'm trying to do is add ScreenSaverGraceperiod /t Reg_SZ /d 900 /f to the existing Winlogin. not create an addtional one.
value.bmp
You have a typo on your original post.

Winlogon

REG ADD "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v ScreenSaverGraceperiod /t REG_SZ /d 900 /f
How to Generate Services Revenue the Easiest Way

This Tuesday! Learn key insights about modern cyber protection services & gain practical strategies to skyrocket business:

- What it takes to build a cloud service portfolio
- How to determine which services will help your unique business grow
- Various use-cases and examples

Author

Commented:
Will try this but I'm not looking to add an extra Winlogin  key only want to add the screensavergraceperiod /t REG_SZ /d 900 /f to the existing key.

Author

Commented:
thanks so much.  That did the trick.
This will replace the existing value if one exists.
No problem.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial