Read registry using vb/java scripts

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

    Read registry using vb/java scripts

    Hi

    I am a newbie to ASP.NET and VBScript, currently I am designing a page
    to show all the mapped drives using client-side scripts..
    I want to read all the mapped drive details (name and Remote Path)
    from the registry ("JKEY_CURRENT_ USER\Network\") then I want to show
    this in list box like

    P: \\machine1\fold er1
    Z: \\mahcine2\fold er2

    How to read all the keys (i.e.: drive names D,E,F...Z) under "HKCU
    \Network" and "RemotePath " key under each drive names using script
    (VB or JAVA) ?

    Also tell me how to use this script in the ASP.NET page or Class file
    to fill the list box control

    Its bit urgent..

    Thanks in advance
    Msk.
  • Jeroen Mostert

    #2
    Re: Read registry using vb/java scripts

    MSK wrote:
    I am a newbie to ASP.NET and VBScript, currently I am designing a page
    to show all the mapped drives using client-side scripts..
    I want to read all the mapped drive details (name and Remote Path)
    from the registry ("JKEY_CURRENT_ USER\Network\") then I want to show
    this in list box like
    >
    P: \\machine1\fold er1
    Z: \\mahcine2\fold er2
    >
    How to read all the keys (i.e.: drive names D,E,F...Z) under "HKCU
    \Network" and "RemotePath " key under each drive names using script
    (VB or JAVA) ?
    >
    Web pages don't normally have access to the registry (or specifically just
    to the list of mapped drives), for obvious security reasons. There are
    multiple approaches you can look into:

    - You can use server-side WMI (see, for example,
    http://www.microsoft.com/technet/scr.../hey1027.mspx).
    This requires that the web server (and the account the page is running
    under) have remote access to the client computer's WMI interfaces.

    - You can write an ActiveX component in .NET for accessing the list of
    network drives (using WMI, for example) and deploy it in your website. This
    requires the use of IE and may need lowered security.

    - You can deploy client-side scripts for WMI, which can post the information
    to a website (or do anything else with it). These have to be run outside the
    web browser, but they can be downloaded from the web browser. Again, this
    may need security adjustments.

    - You can deploy the application as fully client-side, for example through
    ClickOnce.

    Note that in most cases, you should prefer WMI to direct registry access, as
    it saves you the trouble of interpreting information in the registry
    yourself (which is error-prone and subject to breaking on changes). WMI has
    a rich object model that exposes just about anything you could be interested in.

    --
    J.

    Comment

    • MSK

      #3
      Re: Read registry using vb/java scripts

      Thanks for immediate answers...

      MSK

      Comment

      • sloan

        #4
        Re: Read registry using vb/java scripts


        Please do not MULTI POST.






        "MSK" <kartechy@googl email.comwrote in message
        news:3e14a927-d480-49c1-81a3-85c4d285372a@25 g2000hsx.google groups.com...
        Hi
        >
        I am a newbie to ASP.NET and VBScript, currently I am designing a page
        to show all the mapped drives using client-side scripts..
        I want to read all the mapped drive details (name and Remote Path)
        from the registry ("JKEY_CURRENT_ USER\Network\") then I want to show
        this in list box like
        >
        P: \\machine1\fold er1
        Z: \\mahcine2\fold er2
        >
        How to read all the keys (i.e.: drive names D,E,F...Z) under "HKCU
        \Network" and "RemotePath " key under each drive names using script
        (VB or JAVA) ?
        >
        Also tell me how to use this script in the ASP.NET page or Class file
        to fill the list box control
        >
        Its bit urgent..
        >
        Thanks in advance
        Msk.

        Comment

        Working...