Solved

WSH/VBScript - How do I add a QWORD value to the registry

Posted on 2004-04-22
6
1,281 Views
Last Modified: 2012-05-04
I need to add a QWORD value to the registry, and have only found a WSH method to write up to DWORDS (objReg.RegWrite) to the reg.  I need to add a QWORD binary value of 0.  
0
Comment
Question by:swrona
  • 3
6 Comments
 
LVL 22

Expert Comment

by:cookre
ID: 10889758
Alas, MS has seen fit to make it more difficult to create non-reg_dword, non-reg_sz registry entries.  For anything other than reg_sz and reg_dword, you'll have to make a call to RegSetValueEx().

Unfortunately, not being a VBSer, I don't know if API calls are possible.
0
 

Author Comment

by:swrona
ID: 10890480
RegSetValueEx is a VB method, not VBS.  8^(
0
 
LVL 22

Expert Comment

by:cookre
ID: 10893043
Just thought of another possibility - make a .reg file then import it.

For example:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\EE\Testy]
"woohoo"=hex:0f,fa,b0

creates a REG_BINARY value of three bytes.

0
 
LVL 22

Accepted Solution

by:
cookre earned 125 total points
ID: 10895435
Or, for a 64-bit value, for example

"woohoo"=hex:01,00,00,00,00,00,00,00

for a little-endian 64-bit 1
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Installed softare without GUID 6 65
Scripting vs. Programming languages 25 148
User profile Size Report 3 63
batch file problem 5 16
A short article about a problem I had getting the GPS LocationListener working.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

943 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now