read registry keys

Discussion in 'Javascript' started by Borka, Sep 2, 2004.

  1. Borka

    Borka Guest

    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.
    Borka, Sep 2, 2004
    #1
    1. Advertising

  2. Borka

    Mark Preston Guest

    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).
    Mark Preston, Sep 3, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. HK
    Replies:
    1
    Views:
    3,605
    Cowboy \(Gregory A. Beamer\)
    Apr 1, 2004
  2. Replies:
    0
    Views:
    733
  3. Leny
    Replies:
    3
    Views:
    16,903
    Daniel
    Feb 1, 2005
  4. Vlatko Duvnjak

    read registry keys

    Vlatko Duvnjak, Apr 7, 2006, in forum: C++
    Replies:
    2
    Views:
    560
    Tomás
    Apr 8, 2006
  5. rhenders
    Replies:
    1
    Views:
    164
    rhenders
    Oct 7, 2005
Loading...

Share This Page