473,490 Members | 2,695 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Reading a registry value from a client machine

28 New Member
hi all,

I write a javascript for reading the registry value as follows

Expand|Select|Wrap|Line Numbers
  1.  
  2. <script language="javascript" type="text/javascript">
  3. <!-- 
  4.  
  5. function ReadRegistry() {
  6. var WshShell;
  7. var Key;
  8. try
  9. {
  10. WshShell = new ActiveXObject("WScript.Shell");
  11. Key = WshShell.RegRead ("HKEY_LOCAL_MACHINE\\SOFTWARE\\MyApp\\TestValue"); 
  12.  
  13. }catch(e)
  14. {
  15. Key='';
  16. }
  17. document.getElementById("HiddenField1").value=Key;
  18. }
  19. </script>
  20.  
But it didn't return any value.

While using the ActiveXObject class any other points are there to be noted.

Please reply as early as possible

Thanks in advance
Grace
Jul 29 '08 #1
1 1574
Plater
7,872 Recognized Expert Expert
Have you tried changing your code to this:
Expand|Select|Wrap|Line Numbers
  1. catch(e)
  2. {
  3. Key=e.toString();
  4. }
  5.  
So you can see what the error that is being thrown is?
Jul 29 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
8362
by: Omer Ahmad | last post by:
Hi All, I've been working with python for about 6 months now, and have been very impressed with the size and scope of the libraries. I have, however, run into a bit of a problem. I...
3
1919
by: Mike Malter | last post by:
On my XP Professional dev machine, I am able to read the registry by giving permissions to the ASP.NET account on the local machine. When I transfer the code to my staging server (Windows 2003),...
4
2595
by: Yama | last post by:
Hi, How can I get some key values from my ASP.NET residing on client machine but running from my web server? Thanks, Yama
5
8924
by: Scott M. Lyon | last post by:
I've just discovered a bug in some code I wrote a little while ago, and I need you guys' help to fix it. My program imports data from a standard Excel Spreadsheet (just with specific column...
2
470
by: nikou_70 | last post by:
I have a message in (LegalNoticeText) in winlogin in registry ,when user( in our network) log to windows can see massage that I put in LegalNoticeText , every day I should change this message(it's...
5
7932
by: Parv | last post by:
I am working in a domain environment. I am on a client machine and wants to edit registery of domain server. I am currently in a Domain user account and member of Domain administrators on the...
5
5050
by: UJ | last post by:
I have a system that has five programs that all communicate with each other via Message Queues. Works well. One program is a watchdog that will make sure the others are up and going. Currently I...
29
2980
by: Jerim79 | last post by:
I did try to find the answer to this before posting, so this isn't a knee jerk reaction. What I am trying to accomplish is to have a script that opens a cookie, reads a value, and then use a...
2
2806
by: terryastone | last post by:
I have an application that reads some registry values stored in the Local Machine\Software\... key. In XP, I can see these values using RegEdit. In my application I can read the values at...
0
7112
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6974
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
7146
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
7183
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
5448
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3074
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1389
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
277
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.