Setting Value of Registry Key

Started by geauga, November 25, 2016, 11:33:04 AM

Previous topic - Next topic


I am trying to set some values of Registry entries to control showing the "My Computer" on my desktop.  When I do a RegSetDword instead of adding the value it creates a sub-key.  What am I doing wrong?

Code (winbatch) Select
rkey = RegCreateKey(@REGCURRENT, "Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel")
RegSetDword(rkey, "{20D04FE0-3AEA-1069-A2D8-08002B30309D}","0")


You need square brackets around registry value names.  From the Consolidated WIL Help file:

"Note: Named data entries as found in Windows are specified by enclosing the "data item name" in square brackets at the end of the key string. For Example:

RegSetValue( @REGMACHINE,"SOFTWARE\Wilson WindowWare\Settings\WWWBATCH\MAIN[SOUNDS]",1)"

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade