-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Run with PowerShell doesn't use scripts location as working directory #16811
Comments
Thanks for the report, can you screenshot the full PowerShell window |
Are you using the action on the toolbar, or the shell extension in the context menu? |
@yaira2 I find that neither of them can work. They both give me the issue as above. |
Are you able to add the working directory path to the script and send the output |
@Josh65-2201 Hello, thanks for you reply! I think I have found the reason. If I want to execute ps1 file in However, I am very curious that why files set |
It's not suppose to, you might be able to create a shortcut to the script and leave the start in target in properties blank to get the correct path. |
@Josh65-2201 Sorry I know really little about this. Could you provide me more details? And if you do not think this is a issue, feel free to close it. |
It is an issue, what I suggest is a workaround until it fixed. You can right click the script file > Create shortcut > Right click the shortcut > Open properties > Go to |
We might add an optional Files/src/Files.App/Helpers/Win32/Win32Helper.Storage.cs Lines 869 to 874 in 005ebd4
|
Modfying |
Something like this shouldn't affect existing code
|
Let's try it out |
Description
When I use system Explorer to run this powershell file with Run with Powershell Context Menu Item, it works well.
But when I use Files to run powershell file with Run with Powershell Context Menu Item, I encounter this issue.
These are the contents of my ps1 file and I just want to run one dotnet run task.
Related file tree is like that:
Steps To Reproduce
Files Version
3.9.1.0
Windows Version
10.0.26100.3194
User ID
a2edf6d2-76d7-4004-bceb-5cd7ffa27d13
Log File
debug.log
The text was updated successfully, but these errors were encountered: