|
-
Jun 2nd, 2004, 09:11 PM
#1
Thread Starter
Lively Member
Can Javascript read and check windows registry?
Dear Gurus and members,
I am a newbie in Javascript. I would like to know whether can JavaScript check and read windows registry? I am planning to develop a plugin using media control interface(MCI) that will store a value in the registry during the 1st time installation. If the user click on a button, javascript will check the user's computer to see if the value exist on the user's computer. If not, it will ask user to download the plugin before allowing the user to use the record/playback plugin. Otherwise, it will display the record/playback pop up window.
My concern is whether can Javascript check and read the value in the windows registry? If yes, can someone please share the sample codes with me?
I have a code written in VBScript but I am not sure how to 'translate' the codes to Javascript. The codes are as below:
'VBScript to check registry
Option Explicit
Dim WSHShell, RegKey, RecPlay
Set WSHShell = CreateObject("WScript.Shell")
RegKey = " HKEY_LOCAL_MACHINE\SOFTWARE\COMPANYNAME\IEBSOUNDRE
CORDING"
RecPlay = WSHShell.RegRead(RegKey & "ONE.EXE") 'plugin name
If RecPlay = 1 Then
' display plugin
' do start the program
Else
'request download plugin
'response.redirect(url)
End If
' End code
Any suggestions and ideas are highly appreciated. Hope to hear some reply soon.
Thanks in advance,
Janice
-
Jun 2nd, 2004, 11:52 PM
#2
AFAIK, you cannot use JavaScript to read the registry, just VBScript. Something to do with the WScript object
-
Jun 3rd, 2004, 02:25 AM
#3
-
Jun 4th, 2004, 02:56 AM
#4
Thread Starter
Lively Member
Thanks mendhak and visualAd.
There are quite alot of developers and people who has the same idea. However, I fond a site that claims it can be done:
http://www.securiteam.com/exploits/5FP080A5FM.html
I am very confused, as I am a total newbie in Javascript. Can anyone please give me a clearer idea?
By the way, if the registry is replaced by .txt file? Can Javascript read/check for the existance of a .txt file in the user's computer? I don't require writing or changing, just to check whether the .txt file exist. If exist, it will display plug-in. Otherwise, it will request user to download.
Hope to hear some ideas and suggestions soon as this is urgent.
Thanks in advance,
Janice
-
Jun 4th, 2004, 06:38 AM
#5
No, you can't do that either. For the same reason, security.
If it's a real proper plugin then I think you should be able to change some properties in the navigator JS object that you can query with JS.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|