• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 460
  • Last Modified:

how to modify dword registry entry in logon script

What's the synax to change a dword registry entry in a login script? I've got:

[HKEY_LOCAL_MACHINE...}
"State"=

If I use 256 it doesn't change the entry. If I use "256" it replaces the key with a REG_SZ key.

I need it to be a hex entry of 256

Thanks!
0
hullc65203
Asked:
hullc65203
  • 3
1 Solution
 
Christopher McKayCommented:
change the entry manually on one system, then save that key to a .reg file.
then create a batch file with this in it:

reg import <filename.reg>

If you need the reg command, you can download  one from here:
http://www.petri.co.il/download_free_reskit_tools.htm

If you need the hexidecimal for "256" then you need to use: 00000100

Hope this helps!

:o)

Bartender_1
0
 
Christopher McKayCommented:
Or to edit your current command use:

[HKEY_LOCAL_MACHINE...}
"state"=dword:00000100

Hope this helps!

:o)

Bartender_1
0
 
hullc65203Author Commented:
That did the trick. Thanks!
0
 
Christopher McKayCommented:
Thanks for the points!

I'm glad I was able to assist you.

Cheers!

:o)

Bartender_1
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now