Launching a PowerShell shortcut

71 views
Skip to first unread message

David Konigsberg

unread,
Jan 11, 2022, 9:58:19 AM1/11/22
to OneCommander
Just started looking at OneCommander and really like it so far.

I have a few PowerShell scripts that I launch with a shortcut so they just run for example the shortcut is 
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "H:\MyScript.ps1"

In File explorer this will launch a shell and the script will execute and the shell will close. In OneCommander a PowerShell prompt opens and the script does not run. 

Is there a way to get this to work? Did I miss something in my settings? 

David Konigsberg

unread,
Jan 25, 2022, 9:56:52 AM1/25/22
to OneCommander
I note that if I right click and select open the shortcut works correctly. If i just double click it launches powershell and not the script. 

The properties of a shortcut looks like below where the target is the path 
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "H:\MyScript.ps1"
and the start in is the folder the script is located in
One Commander.png

Reply all
Reply to author
Forward
0 new messages