Solved

Script help for binary reg key change

Posted on 2009-07-07
2
546 Views
Last Modified: 2012-08-13
i need to script a change to reg key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2

to overwrite the existing setting with :
"Settings"=hex:28,00,00,00,ff,ff,ff,ff,03,00,00,00,03,00,00,00,6b,00,00,00,22,\
  00,00,00,00,00,00,00,de,03,00,00,00,05,00,00,00,04,00,00

I don't know how to do this... i came up with :  
Option Explicit
On Error Resume Next

'Const HKCU = &H80000001 'HKEY_CURRENT_USER


strComputer = "."
Set StdOut = WScript.StdOut
'load the registry
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")

'strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2"

But I don't knwo where to go from here or if this will even work...

If anyone can help me, I'd really appreciate it.

Thanks,
KV
0
Comment
Question by:katievegas1127
[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
2 Comments
 
LVL 38

Accepted Solution

by:
Shift-3 earned 500 total points
ID: 24797410
Paste the script below into a text file with a .cmd extension.  Running it will set the registry value.


@echo off
setlocal
 
set key=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2
set data=28000000ffffffff03000000030000006b0000002200000000000000de0300000005000000040000
 
reg add "%key%" /v Settings2 /t REG_BINARY /d "%data%" /f

Open in new window

0
 

Author Closing Comment

by:katievegas1127
ID: 31600731
Thank you!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

There are 2 things you must have in order to connect to the internet behind a router, The "Gateway IP" of the router, which is usually something like 192.168.xxx.1, I've seen routers with default values of: 192.168.0.1, 192.168.1.1, 192.168.11.1, …
Ok I have been working on this for some time having learned and gained certification in XenDesktop 4 along came version 5 which was released last month. Since then I have been working to deploy XenDesktop 5 in a small environment with only 2 virt…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 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