Thanks guys. I've been so busy. I just now got back to check the forum. I'd forgotten about this.
Ray, I tried your suggestion, but still no results. The same command that works from the command line, does not work from within Sesame.
I've tried:
@RedirectProcess("C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File S:\Sesame2\Test.ps1", "")
@Shell("C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File S:\Sesame2\Test.ps1")
CreateAProcess("C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File S:\Sesame2\Test.ps1")
I've even tried adding "cmd /c" in front of each of those, but no luck.
Aha! Got it working.
Ray, your post helped me rethink what was going on with the PowerShell command. To run a PowerShell file, you need to set the ExecutionPolicy within PowerShell to allow it. I had done that for "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe", but apparently even though I specified that path, when Sesame calls it, the OS delivers up the one in SysWOW64, instead. Once I set the ExecutionPolicy in the SysWOW64 version, I was able to run it with either of the following commands:
// Works. Sesame waits until the black DOS window is finished displaying.
@Shell("powershell -File .\test.ps1")
// Works. Sesame does NOT wait until the blue PW window is finished displaying.
CreateAProcess("powershell -File .\test.ps1")
Thank you!