I'm trying to have a scheduler to run a Vbscript, which it will run a Powershell script. Basically here is my Vbscript
command = "powershell.exe -nologo -command C:\Users\someuser\Desktop\appAPIMonitor.ps1"
set shell = CreateObject("WScript.Shell")
shell.Run command,0
When I run above script, it worked. But when I place the script at my preferred path, the script wont run as before. So it must be the path not valid. Here is my new script
command = "powershell.exe -nologo -command C:\Users\someuser\My Work\App\Project\My.API.App\Scripts\appAPIMonitor.ps1"
set shell = CreateObject("WScript.Shell")
shell.Run command,0
Can somebody point what is wrong with my path? Is it the whitespace in My Work? Or the dot in My.Api.App?