I want to add a button to the right-click menu so that it can run the PS1 file directly. What should I do?
Perhaps it is
FileType ACTION=shellex SHELLCLASS=???
I want to add a button to the right-click menu so that it can run the PS1 file directly. What should I do?
Perhaps it is
FileType ACTION=shellex SHELLCLASS=???
FileType ACTION=shellex should be enough if you want to do the same as double-clicking the file.
I want to run a .ps1 script, use DO's context menu(the default is notepad)
powershell.exe {filepath$} will do that, I think. (Not an expert on PowerShell.)
I use a button with:
@runmode hide
Powershell -executionPolicy bypass -noexit -file {filepath$}
Okay, there are some inexplicable and wonderful problem. In the registry, it looks like this for your reference
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" "-Command" "if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & '%1'"