read registry keys

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Borka

    read registry keys

    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.FileS ystemObject");
    JWS = new ActiveXObject(" WScript.Shell") ;
    key =
    JWS.RegRead("HK LM\\Software\\M icrosoft\\Windo ws\\CurrentVers ion\\Run\\").to L
    owerCase();
    or
    key =
    JWS.RegRead("HK LM\\Software\\M icrosoft\\Windo ws\\CurrentVers ion\\Run").toLo w
    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.



  • Mark Preston

    #2
    Re: read registry keys

    Borka wrote:
    [color=blue]
    > 1. I write script which controls registry settings, which must work
    > on every computer.[/color]

    Failure point one - many computers don't *have* a registry, so quite
    obviously your "must work" will *always* fail.
    [color=blue]
    > JFSO = new ActiveXObject(" Scripting.FileS ystemObject");[/color]

    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).

    Comment

    Working...