ConvertTo-Jpeg icon indicating copy to clipboard operation
ConvertTo-Jpeg copied to clipboard

Quick launch mode

Open Serj-Levonyuk opened this issue 10 months ago • 2 comments

It would be nice to have ability to just launch this script with no params and have all supported files in folder where script located converted. With prompt like "All HEIC and RAW files in this folder will be converted. Proceed? Y/N".

Serj-Levonyuk avatar Jan 16 '25 16:01 Serj-Levonyuk

That seems unusual for a PowerShell script and potentially impactful if the person picks the wrong choice.

DavidAnson avatar Jan 16 '25 16:01 DavidAnson

If it helps, I put the following in the registry to register the script as a right-click context item for *.heic via explorer. I infrequently need a quick way to convert and typically the easiest way to do that is via a right-click operation.

You can select multiple files and explorer will execute the script file for each file - I haven't figured out how to get explorer to pass an array of files but given my infrequent usage, I didn't see it as a major blocker. Image

ConvertTo-Jpeg-registerPSScriptForHeicConversion.reg Note: I used a generic icon from one of the system dll's just to make it easier to see Also, you'll have to update the scriptlocation to where you're putting the ps1 file

[HKEY_CLASSES_ROOT\SystemFileAssociations\.heic\Shell\psConvertToJpeg]
@="Convert to JPG with PS"
"Icon"="%windir%\\system32\\dsuiext.dll,22"

[HKEY_CLASSES_ROOT\SystemFileAssociations\.heic\Shell\psConvertToJpeg\command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" -File \"c:\\scriptlocation\\ConvertTo-Jpeg.ps1\" \"%1\""

seanmcne avatar Jan 30 '25 19:01 seanmcne