Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > read registry keys

Reply
Thread Tools

read registry keys

 
 
Borka
Guest
Posts: n/a
 
      09-02-2004
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\\C urrentVersion\\Run\\").toL
owerCase();
or
key =
JWS.RegRead("HKLM\\Software\\Microsoft\\Windows\\C urrentVersion\\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.



 
Reply With Quote
 
 
 
 
Mark Preston
Guest
Posts: n/a
 
      09-03-2004
Borka wrote:

> 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).
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
read registry keys Vlatko Duvnjak C++ 2 04-08-2006 02:41 PM
How to read (non-event log) registry keys as ASP .NET process rhenders ASP .Net Security 1 10-07-2005 02:53 PM
How to read a registry key from Windows registry ? Leny Java 3 02-01-2005 07:54 AM



Advertisments