Solved

Script help for binary reg key change

Posted on 2009-07-07
2
548 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Disclosure: Use this tutorial only when no other options helps to get Windows XP running without any problems and you don't want to format the drive. The back up of the data is the responsible of the user, however there is a description of how t…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

626 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