473,836 Members | 1,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

reading USER from Registry - Javascript

1 New Member
Hi all,

I've been having this mega-problem for a while now.
I'm trying to access the Registry; I've tried using PHP (server-side, so won't work), so I've gone client side, and seeking for the solution within Javascript.

I know theres a lot of issues with accessing the Registry from Javascript, mainly having to have low security settings in order to beable to read it, and so on, but this won't be an issue (hopefully) as once I have got the program to do what I want, I'm handing it over to people who can deal with all the .hta and certificate stuff.

I'm pretty proficient in Javascript, but I can't get any script working for the life in me.
Here's some code I've found and been playing about with:

Expand|Select|Wrap|Line Numbers
  1.   function shell(){
  2.     var sh1 = new ActiveXObject("WScript.Shell");
  3.     var sh2 = sh1.RegRead("HKEY_CURRENT_USER");
  4.     alert(sh2);
  5.   }
  6.  
Obviously this is wrong, since it doesn't work, but does anyone know why? All I need to do is get the user inside a variable and I'm away.

Thanks in advance :)
Jul 4 '07 #1
1 1690
kovik
1,044 Recognized Expert Top Contributor
Last I checked, Microsoft forbids registry access through IE.
Jul 4 '07 #2

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

Similar topics

1
5032
by: Duncan Allen | last post by:
I'm trying to use aspnet_setreg to encrypt user names & password used in the web.config file for use in the indentity element. When the website runs I get the message 'Error reading the password from the registry'. I'm using Windows XP SP2, Framework 1.1 . The code in the web.config file is : <identity impersonate="true" password="registry:HKLM\SOFTWARE\MyCompany\MyApp\Website\Identity\ASPNET_SETREG,password...
3
1953
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), I am getting a System.Security.SecurityException: Requested registry access is not allowed. The key is there, I exported it from my XP machine. The permissions are there, and I can see in the error message the code breaks where I try to read...
5
12954
by: Dhilip Kumar | last post by:
Hi All, I'm writing a Windows Service app using C#. I need to read some configuration settings before the service starts up. These settings will be used by the service in its operation. Question is, which is the best way to store & retrieve the settings? I'm thinking of storing it in the registry in HKLM\Software\ServiceName and access it using the Registry class in the "public ServiceName()" method. I'm instructing the service...
3
5078
by: Ahmad Jalil Qarshi | last post by:
Hi! I am developing an application in C# as a windows NT Service. This application needs to check for eventlog using EventLog.Exists("System") But unfortunately it generates exception "Requested registry access is not allowed."
12
6397
by: Simon Hart | last post by:
Hi, I am using Impersonation and turned off anon access for my web service. I am using the administator to authenticate the request using ICredentials. I am simply trying to read a key in HKEY_CURRENT_USER from my Web Service method call which I am unable to. When I try and open it it returns null. Even iterating all keys under HKEY_CURRENT_USER only returns a handful of keys. I can happily read any key under HKEY_LOCAL_MACHINE. I have...
5
5092
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 have it store info it gets from when the programs check in into a DataSet (XML file). Problem is, that file now has to be used by other programs to find out version information (the file is ALWAYS less that 1K.) The record itself is only five fields...
3
1803
by: Aussie Rules | last post by:
Hi, I want to store some data in the registry, however I have not been able to do this, and think my logic maybe flawed. Firstly I try to open the registry and read in any existing values. Dim aKey As RegistryKey aKey = Registry.CurrentUser.OpenSubKey("software\myApplication") I then attempt to read in any existing values
0
4010
by: tmsprowl | last post by:
Greetings! I was wondering if someone could help me with a problem I'm having. My department is just one of many within my organization. My organization has control over the network domain, but my department has a couple of web servers of our own that are part of my organization's domain. I am trying to read LDAP information on my organization's domain controller from a web application on one of my department's servers. I have been...
1
1588
by: gracepaul | last post by:
hi all, I write a javascript for reading the registry value as follows <script language="javascript" type="text/javascript"> <!-- function ReadRegistry() { var WshShell;
0
9816
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9668
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10546
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9371
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5823
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4448
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 we have to send another system
2
4013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3112
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.