
Send To Image Searches from File Explorer context menu - cannot get Powershell script to fruition - To Google OR Yandex IMG searches
https://i.redd.it/iuvu3jg3lq2h1.png
I can't seem to get Powershell script to fruition - can you see and maybe fix? Is there a better way? Maybe small .exe instead of [POWERSHELL]? I tweaked the script so much with Gemini to no avail the script did open browser tabs to both Google and Yandex IMG SRC services but didn't not even once send IMG from FIle Explorer to IMG-SRC query function. Please can u fix? Using Win 10.
Full code in Pastebin: https://pastebin.com/4cEN4Wnv
Core part of code is: per img type - example:
[HKEY_CLASSES_ROOT\SystemFileAssociations.jfif\shell]
[HKEY_CURRENT_USER\SOFTWARE\Classes\SystemFileAssociations.jfif\shell\SearchGoogleImage]
@="Send to Google Images"
[HKEY_CURRENT_USER\SOFTWARE\Classes\SystemFileAssociations.jfif\shell\SearchGoogleImage\command]
@="powershell.exe -windowstyle hidden -Command "$url = curl.exe -s -i -F 'encoded_image=@%1' 'https://lens.google.com/v3/upload?ep=subb' | Select-String -Pattern 'Location: (.*)' | ForEach-Object { $_.Matches.Groups[1].Value.Trim() }; if ($url) { Start-Process $url } else { Start-Process 'https://lens.google.com' }""
[HKEY_CURRENT_USER\SOFTWARE\Classes\SystemFileAssociations.jfif\shell\SearchYandexImage]
@="Send to Yandex Images"
[HKEY_CURRENT_USER\SOFTWARE\Classes\SystemFileAssociations.jfif\shell\SearchYandexImage\command]
@="powershell.exe -windowstyle hidden -Command "$url = curl.exe -s -i -F 'upfile=@%1' 'https://yandex.com/images-apphost/image-download?cauthor=sidebar' | Select-String -Pattern 'Location: (.*)' | ForEach-Object { $_.Matches.Groups[1].Value.Trim() }; if ($url) { Start-Process $url } else { Start-Process 'https://yandex.com/images/' }""