computing
  • 0

Can’t Run Vbscript From Batch File

  • 0

When I click on this Vbscript “InitiateStartScreen.vbs”
it changes desktop to Start Screen.

Set WshShell = WScript.CreateObject(“WScript.Shell”)
WshShell.SendKeys “^{ESCAPE}”

But I can’t get a batch file to execute it.

Any help appreciated.

I should add I want the batch file to terminate and the Start Screen to display, which running the vbscript does.

Share

1 Answer

  1. start InitiateStartScreen.vbs

    Keep in mind that the batch file must be in the same directory as the vbs file. Otherwise you must include either the full path, or if it’s in a sub-directory you must specify the path from where the batch file is, like this:

    start "C:\Folder\Folder2\script.vbs"

    or

    start "SubDir1\Subdir2\script.vbs"

    Don’t worry if plan A fails, there are 25 more letters in the alphabet 😉

    • 0