PowerShell script works from command line but not in XYplorer script

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
zBernie
Posts: 179
Joined: 08 Dec 2016 17:20

PowerShell script works from command line but not in XYplorer script

Post 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");

jupe
Posts: 2794
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

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

Post 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");

Post Reply