Page 1 of 1

PowerShell script works from command line but not in XYplorer script

Posted: 11 Mar 2018 05:05
by zBernie
The commad below in quotes works from the PowerShell command line, but not in a script I have assigned to a button. I also "Tried" the script, and there are no errors. Any idea why it's not working?

runret("C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe C:\Users\bernie\PowerShell\processphotos.ps1");

Re: PowerShell script works from command line but not in XYplorer script

Posted: 11 Mar 2018 08:12
by jupe
runret() gives a return, unlike run(), so you need to give it something to return into, like a variable or another command etc, try this instead:

Code: Select all

text runret("C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe C:\Users\bernie\PowerShell\processphotos.ps1");