472,093 Members | 2,528 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Using JavaScript and VBScript scripting to access the windows registry

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
4 6225
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

"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
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

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.

Similar topics

3 posts views Thread by Angus Comber | last post: by
42 posts views Thread by (PeteCresswell) | last post: by
11 posts views Thread by Doug van Vianen | last post: by
reply views Thread by leo001 | last post: by

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.