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