tutasolution.blogg.se

Open file in powershell
Open file in powershell











open file in powershell open file in powershell

Then the script would wait for the photos process to close to continue on. If I can get the file to simply open in the photos app I can simply click the edit button manually but ideally I would be able to open the file in the edit UI like this: However I would like to start the process and pass in a filepath to open, for example: Start-Process shell:AppsFolder\_8wekyb3d8bbwe!App "C:\Some\Path\To\File.mp4" In the filename variable, specify a string that might indicate the file contains.

open file in powershell

$proc = Get-Process -Name Microsoft.Photos Open the PowerShell ISE Create a new script using the following code. When manually editing the file it opens in the photos app to trim, I would like to automate the part of opening the file in the app.Ĭurrently I'm able to monitor the photos app process and wait for the process to close using the following code: Start-Process shell:AppsFolder\_8wekyb3d8bbwe!App mp4 file to trim it in the default windows 10 app. I am trying to write a simple shell script in powershell that opens a file in a default windows app and monitors the process to wait until the process has exited to continue.













Open file in powershell