473,396 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Read registry using vb/java scripts

MSK
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.
Jul 11 '08 #1
3 2638
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\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.../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.
Jul 11 '08 #2
MSK
Thanks for immediate answers...

MSK
Jul 11 '08 #3

Please do not MULTI POST.

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


"MSK" <ka******@googlemail.comwrote in message
news:3e**********************************@25g2000h sx.googlegroups.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\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.

Jul 11 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Your Friend | last post by:
Hello All, I'm relatively new to Python programming but have been working on this problem for a little bit now ... I initially began writing UNIX scripts in Python and thought it was the...
2
by: sriram pasham | last post by:
Hi Could any one tell me how to access(read) a registry key using javascript from a webpage(ASP page). Thanks in advance. Sriram *** Sent via Developersdex http://www.developersdex.com ***...
2
by: fabrice | last post by:
hello, Is it possible to read a registry key in ASP, and use the value in an application via a session variable. I'm using II6 on windows server 2003. I'd like to create a key in the registry...
6
by: George Hester | last post by:
This location has a parasite checker using javascript. It is in a js file called parasite.js. It is freely available. http://www.doxdesk.com/parasite/ He\She is the only one I trust on the...
17
by: Sam | last post by:
Hi all If I only want to store screen location and size of my application in Windows Registry, which of the keys should I store this info? A sample code is greatly appreciated. Thank you ...
2
by: celiaachkar | last post by:
hello everyone, I'm Celia and I 'd like to know how can I read the value of a a Win (XP) registry in Java? If someone could help me with that. Thank you! Celia
4
pritipshah
by: pritipshah | last post by:
Hello All, I want to Access Registry from PHP script. I had sreach on net and I got Class for this which is as below. <?php class Registry { private $vars = array();...
6
by: sd | last post by:
hello I need to keep my app entry under HKEY_LOCAL_MACHINE\Software\MyApp. (to support for all users).I need to update one key under MYApp. When I attempt to set value for this key...
3
by: MSK | last post by:
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.