Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Read registry using vb/java scripts

Reply
 
Old 07-11-2008   #1 (permalink)
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\folder1
Z: \\mahcine2\folder2

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.

My System SpecsSystem Spec
Old 07-11-2008   #2 (permalink)
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 ("HKEY_CURRENT_USER\Network\") then I want to show
this in a list box like

P: \\machine1\folder1
Z: \\mahcine2\folder2

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.
My System SpecsSystem Spec
Old 07-11-2008   #3 (permalink)
Jeroen Mostert


 
 

Re: Read registry using vb/java scripts

MSK wrote:
Quote:

> 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\folder1
> Z: \\mahcine2\folder2
>
> 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...5/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.
My System SpecsSystem Spec
Old 07-11-2008   #4 (permalink)
MSK


 
 

Re: Read registry using vb/java scripts

Thanks for immediate answers...

MSK
My System SpecsSystem Spec
Old 07-11-2008   #5 (permalink)
sloan


 
 

Re: Read registry using vb/java scripts


Please do not MULTI POST.

http://groups.google.com/group/micro...3e3fc09a764e9#




"MSK" <kartechy@xxxxxx> wrote in message
news:3e14a927-d480-49c1-81a3-85c4d285372a@xxxxxx
Quote:

> 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\folder1
> Z: \\mahcine2\folder2
>
> 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.

My System SpecsSystem Spec
Reply

« windows xp | r »
Thread Tools


Similar Threads
Thread Forum
unable to add java scripts General Discussion
Script: read a registry key VB Script
Re: Printer cannot read registry key? Vista print fax & scan
Read from Registry on Vista Vista security
Read from Registry on Vista Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46