What is the difference between the WSH and WScript objects?
this.wsf:
<?xml version="1.0" encoding="utf-8"?>
<package>
<job id="this">
<?job error="true" debug="true"?>
<script>
this;
debugger;
</script>
</job>
</package>
Double click on the WSF file, or execute this command to debug with Visual Studio:
wscript /d /x this.wsf
In Visual Studio, when you hover over this, you see two objects: WSH and WScript.
Which should be used?
They are the same object, so it doesn’t matter which one you use, but all the examples use WScript.