Solved

Script help for binary reg key change

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

821 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