This section introduces convenient ways of using other Objects available in Windows. To use Objects, use the ActiveXObject Object in JavaScript or CreateObject function in VBScript.
The following example uses WScript.Shell Object to display the current directory.
WshShell = new ActiveXObject( "WScript.Shell" );
alert( WshShell.CurrentDirectory );
Set WshShell = CreateObject( "WScript.Shell" )
alert WshShell.CurrentDirectory
Microsoft MSDN Library: ActiveXObject Object (JavaScript)
Microsoft MSDN Library: CreateObject Function (VBScript)
Send feedback on this topic to Emurasoft