read registry keys

B

Borka

Hi all!

I have some questions.
1. I write script which controls registry settings, which must work
on every computer.
If I try
JFSO = new ActiveXObject("Scripting.FileSystemObject");
JWS = new ActiveXObject("WScript.Shell");
key =
JWS.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\").toL
owerCase();
or
key =
JWS.RegRead("HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run").toLow
erCase();
I recieve the message:
"Unable to open registry key ... for reading."

I heard I can read it using WMI, but WMI must be installed
on every PC where my script will work. It's unreal.
Is there a possibility to read this key without WMI?

2. I would see content of binary file in a hexadecimal form.
How can I read binary file?

Thank in advance.
Boris A. Chertenko aka Borka.
 
M

Mark Preston

Borka said:
1. I write script which controls registry settings, which must work
on every computer.

Failure point one - many computers don't *have* a registry, so quite
obviously your "must work" will *always* fail.
JFSO = new ActiveXObject("Scripting.FileSystemObject");

Failure point two - the ActiveX is a Windows object so can *only* work
on Windows machines (or on those which have very deliberately chosen to
incorporate something similar).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top