By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,342 Members | 1,177 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,342 IT Pros & Developers. It's quick & easy.

Using JavaScript and VBScript scripting to access the windows registry

P: n/a
Is there any difference to read & write to windows Registry with
VBScript or JavaScript?
Both scripting languages have similar syntax. What is preferable use
for this?

thanks.

Apr 8 '06 #1
Share this Question
Share on Google+
4 Replies

P: n/a
VK

ko****@hotmail.com wrote:
Is there any difference to read & write to windows Registry with
VBScript or JavaScript?


There is not any. Both languages are not able to do it.

If you are using local (file://) script to access FileSystemObject,
then it is also irrelevant what language to use: JScript or VBScript.
FileSystemObject is not part of neither of both, so its method/property
set is equal.

Apr 8 '06 #2

P: n/a

"VK" <sc**********@yahoo.com> wrote in message
news:11**********************@e56g2000cwe.googlegr oups.com...

ko****@hotmail.com wrote:
Is there any difference to read & write to windows Registry with
VBScript or JavaScript?


There is not any. Both languages are not able to do it.

If you are using local (file://) script to access FileSystemObject,
then it is also irrelevant what language to use: JScript or VBScript.
FileSystemObject is not part of neither of both, so its method/property
set is equal.


VBScript can access the fileSystemObject - just not *normally* from a web
page.
Remember the "I-Love-You.vbs" virus ?
Put a "vbs" extension on a file with VBScript, and it'll run with a
double-click.
Apr 9 '06 #3

P: n/a
ko****@hotmail.com wrote:
Is there any difference to read & write to windows
Registry with VBScript or JavaScript?
Presumably you are referring to the interfaces to the Windows Registry
provided by Windows Scripting Host. In WSH the host provides the same
object model to whichever scripting language is used; the same objects,
methods, properties, etc.
Both scripting languages have similar syntax.
No they don't.
What is preferable use
for this?


If you only know one of those languages then that one is probably the
best to use. If you know both then whichever you prefer is going to be
the best. And if you know neither VBScript may be best as it is the
language used in the vast majority of examples of WSH scripting.

Richard.
Apr 9 '06 #4

P: n/a

Richard Cornford писал(а):

ko****@hotmail.com wrote:
Is there any difference to read & write to windows
Registry with VBScript or JavaScript?
Presumably you are referring to the interfaces to the Windows Registry
provided by Windows Scripting Host. In WSH the host provides the same
object model to whichever scripting language is used; the same objects,
methods, properties, etc. Both scripting languages have similar syntax. No they don't.
What is preferable use for this?
If you only know one of those languages then that one is probably the
best to use. If you know both then whichever you prefer is going to be
the best. And if you know neither VBScript may be best as it is the
language used in the vast majority of examples of WSH scripting. Richard.

--------------
When we need use Windows Scripting Host, both languages have almost
similar syntax:

<script language="VBScript">
<!--
Dim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")
....
<script language="javascript">
<!--
var WshShell = WScript.CreateObject("WScript.Shell");
....

The difference only that Javascript have no 'Dim WSHShell' line. Or it
need this also? Also, if we use mostly Javascript for webpage, we can
use Javascript for WSH.

Korund

Apr 10 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.