Update.
If you are going to use VBScript (.vbs) then please add On Error Resume Next to the beginning of your code.
Also if you have Microsoft Visual Studio installed on your machine you must disable the Just in time bugger:
To enable/disable Just-In-Time debugging
1. On the Tools menu, click Options.
2. In the Options dialog box, select the Debugging folder.
3. In the Debugging folder, select the Just-In-Time page.
4. In the Enable Just-In-Time debugging of these types of code box, select or clear the relevant program types: Managed, Native, or Script.
To disable Just-In-Time debugging, once it has been enabled, you must be running with Administrator privileges. Enabling Just-In-Time debugging sets a registry key, and Administrator privileges are required to change that key.
5. Click OK.
Good luck!