40

I need to be able to open about 16 JPGs in Chrome all at once, without having to select each one and do Open With. When I select multiple files, the Open With option disappears. How do I make it available with multiple files selected?

Several answers so far have provided decent workarounds, but they're not very flexible when I work on a large variety of files where Open With would be useful. Is there a way to actually do Open With on multiple files?

For anyone coming here in the future, I don't believe there's any proper workaround. If this matters a lot to you, I've created a feedback item in the Feedback Hub that you can upvote.

Update 02/11/22: My best solution so far is to open Chrome on my second monitor (or on half of my main monitor), then have the folder open on my main monitor (or other half) and then double-click each file in quick succession. It's still tedious but so long as I make sure the last Chrome window I clicked on isn't going to appear over the top of the folder when the file opens, it's pretty quick.

Clonkex
  • 1,156

12 Answers12

25

A workaround to this is to use "Send to" menu in the right click context menu in Windows File Explorer. Here's how -

Step 1
Add a shortcut to the Google Chrome executable (chrome.exe) to the SendTo folder.
SendTo folder: %AppData%\Microsoft\Windows\SendTo

The easiest method to do this is -

  • Right click on a Google Chrome shortcut [Note]
  • Drag and drop it into the SendTo folder and select Copy.

Note:
Google Chrome shortcut is usually created on the Desktop and/or in the Start Menu folder, when Chrome is installed.
Start Menu folder: %AppData%\Microsoft\Windows\Start Menu\Programs
Right-click this shortcut, select Properties, and confirm that the Target field contains no command line options, just the path + file name for Chrome.

This will enable you to push images, PDFs and other compatible files to Chrome.

Step 2

Select 16 JPGs (or more), right click, go to "Send to" menu & select "Google Chrome".

That's it. All JPGs will open in Google Chrome, each in its own tab.
I use this with Firefox, but it should work with Chrome too.

Firefox in Explorer's 'Send to' right click context menu

Troubleshoot #1
If Google Chrome doesn't appear in the "Send to" menu, try restarting Windows File Explorer from Task Manager.

Troubleshoot #2
If the JPGs open in multiple windows, you might want to consider installing an extension in Chrome to prevent this behaviour.

xypha
  • 4,890
23

Save the below text to a text document name OpenWith.txt and then rename it to OpenWith.reg. You will next double-click to import the new registry settings. Now when you highlight all the applicable JPG files, the Open With option will be available, and it'll open all those with the Google Chrome app.


Create the Open With option when multiple JPG files are selected

Registry Settings to Import

You will need to point the below key's value that points to chrome.exe to the correct full path location on your system where the chrome.exe exists.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\SystemFileAssociations\image\shell\Open With\command]
@="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" \"%1\""

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer]
"MultipleInvokePromptMinimum"=dword:00000016

enter image description here


Further Resources, Notes, and Considerations

  • Microsoft KB2022295
  • Please note that per the above Registry Settings to Import section, you can name the registry key named "Open With" as "Open With Chrome" or whatever else you wish and it'll still do the same thing, open all the selected JPG files with Chrome.exe as per the other configuration. So just know that whatever you name that key, this is the text you'll see in place of Open With. enter image description here
20

I need to be able to open about 16 JPGs in Chrome all at once, without having to select each one and do Open With.

You have the Google Chrome shortcut icon, you then have all JPG filez selected in another window beside that, you then drag all those over to the Google Chrome shortcut icon, and all those JPG files will open with Chrome.

This gives you just what you ask, select all applicable JPG files, and then open those up with Chrome without needing to select the open with option.

enter image description here

13

I'm not going to suggest a solution in my answer since the best you can do without 3rd-party tools is probably PIMP_JUICE_IT's answer (although that answer is simply adding a new supplemental verb and it has nothing to do with the Windows "Open With" functionality and should be named accordingly).

I will however try to explain the technical details about what is going on and why:

The "Open With" submenu is implemented as a IContextMenu shell extension and is registered under HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers. When you right-click on one or more items in a shell folder the shell looks at various keys under HKEY_CLASSES_ROOT to build the menu. Entries under ...\shellex\ContextMenuHandlers are dynamic and execute actual computer code that determines how many menu items to add (if any).

It seems like Microsoft coded the "Open With" extension to only add the submenu when you select a single file, with one exception; multiple shortcuts (.lnk) can be selected and you will still get the submenu (at least on my Windows 8 machine). I'll go out on a limb and say that the shortcut handling is a bug.

There is no technical reason why the menu could not work for multiple files and in fact it used to work just fine on Windows XP:

WinXP Open With menu

I'm guessing the main reason they removed it is; what do you do when the user selects files of different types? However, there is already a precedent for this; you can select files of different types and press enter to open all of them. When you do this the shell just uses the action associated with item that has the focus rectangle.

It would be possible for a 3rd-party software vendor to create a similar menu that works for multiple files. The only restriction is that the "Choose another app"/"Choose default program" item at the bottom of the menu would probably have to be disabled when there are multiple files because the official way to invoke that dialog only supports a single file path. To fill the menu it would simply use SHAssocEnumHandlers to build a list of applications that are available for the specified file type.

This is such a edge case that nobody has spent to time to re-implement the "Open With" extension just to support multiple files even though it would be technically possible to do so...

Anders
  • 501
2

When I've encountered this, I've done the following:

  1. "Open" Chrome
  2. Drag-&-drop each JPG onto a tab. You need to do this per tab (see below). Shortcut to add tabs is Ctrl + T so you won't worry using the mouse much.

Note: When you select multiple JPG then drag-& drop, only the first or the last one selected will be shown.

Shog9
  • 522
2

This will open all jpg files in the folder in Chrome in separate tabs

1) Copy all the JPG files you want to open to a folder.

2) Open notepad. Paste the code below inside. Click save. Go to the folder mentioned above. Give the name as "open.bat" and select "All Files" below. Save.

3) Go to the folder and open "open.bat"!

Code:

set PATH=%PATH%;C:\Program Files (x86)\Google\Chrome\Application
SET names=
for /r %%i in (*.jpg) do call SET names= %%names%% "%%i"
echo %names%
start chrome.exe %names%

I've assumed the default installation directory of chrome. You may need to change it if you have done a custom installation.

pulsejet
  • 2,250
2

My work pretty much requires that my images open by double-clicking with Windows Photo Viewer (because Windows 10's Photos app is crap). – Clonkex

Since you have the constraint on the default JPG viewer not being able to be changed, then you can change the default editor to be Google Chrome instead.

Once this is complete via the registry change described below, when you have all applicable JPG files selected, right-click, and then select the Edit option. All the files will open with Google Chrome.

enter image description here


The Registry Change

It seems the Registry Editor export of this option dumps in HEX value so I'll put the steps to change from the Registry Editor GUI.

The Key Path

  • HKEY_CLASSES_ROOT\SystemFileAssociations\image\shell\edit\command

Change the value to the full path of the Chrome.exe application on your system followed by "%1" just as shown in the below screen shot:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "%1".

enter image description here

1

Is there a way to actually do Open With on multiple files?

You could just select Open and all would do what you ask as well. . .

From the Control Panel, go to Default Programs, select Associate a file type or protocol with a program, and then change the default for both .jpg and .jpeg to Google Chrome.

Now when you select all applicable JPG files and select Open, all the selected JPG files will open with Google Chrome. This method uses the multiple-selected JPG file right-click Open option rather than Open With option so that may suffice for the need as you describe.

enter image description here

enter image description here

1

If you prefer not to mess around with the registry,

You can use FileMenu Tools. It allows you to add custom commands to your context menu.

enter image description here

enter image description here

However, the custom command feature is not free. A license costs ~10 dollars. There is a 30-day trial.

tinker
  • 350
1

I think this registry script will do a better job.

Explanation: It calls for a program.exe but this does not exist and therefore it opens the shell to chose an application. Because of this you can even do it with more files and even with different file extensions.

Disclaimer: This does not open only ones it actually opens for every file another application choser.

To install: paste the script in a txt file and save as filename.reg and dubble click the file.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\Open With\command]
@="program.exe"
0

The simple answer is that there has been absolutely no way to do this since Windows Vista. There is some hope, however - with the new Microsoft's increasing emphasis on open source, there's a good chance that a significant enough amount of (Windows 10) users requesting the feature may be enough for them to finally introduce this as a feature. There's even an app bundled with Windows 10 for this express purpose: the Feedback Hub.

If, like me, you're coming across this answer and you really want the long-overdue capability of removing the single-file limit for the "Open With" context menu item, in the same way that it's currently possible to remove the 15-file limit for the "Open" and "Edit" content menu items, then you can make a request over at Windows 10's Feedback Hub. Currently, that is everyone's best chance at seeing this feature become a reality.

Hashim Aziz
  • 13,835
0

SUMMARY

  1. In Registry put the target program as Context Menu Create File.exe which writes reg.txt file.

  2. In your main program loop every 1 second to check if reg.txt exists. If it exists, kill the Context Menu Create File.exe and delete the reg.txt file. Then copy the selected file paths and manipulate with them.

  3. If your program loops to check for reg.txt, then you need to start the program before executing context menu either on startup or manually.

I did this with AutoHotkey.

These 2 AutoHotkey scripts below allow you to add a Open With Chrome context menu item in Windows Explorer to open multiple selected files.

You can leave all variable values as they are, but if you want to change the contextMenu value and program name then see 3.1.

INSTRUCTIONS:

Create 2 files in the same directory:

  1. Create 1st program Add To Context Menu And Create Startup Shortcut.ahk

    1. RunAsAdmin Label ensures that the script runs as admin (fixes adding Registry values).

      1. The If (!A_IsAdmin) checks if current user is NOT admin, A_IsAdmin is a built in AutoHotkey variable that returns 1 if user is admin, 0 otherwise.
      2. Run, \*RunAs "%A_ScriptFullPath%" *RunAs parameter runs the script as admin, "%A_ScriptFullPath%" gets the full path of the current executing script.
      3. ExitApp exits the current script instance running without admin privileges.
      4. Because the Run command runs the script again with admin privileges it will skip the IF condition and continue executing code below.
    2. ContextMenuCreateFile: Label creates a Context Menu Create File.exe which creates a file reg.txt and exits Context Menu Create File.exe after it has written the file reg.txt. Make sure you specify where your Ahk2Exe.exe path is in the RunWait command.

    3. Add To Context Menu: Label adds the Registry entry which runs Context Menu Create File.exe.

      1. Set the contextMenu variable to what needs to be displayed in the Context Menu. (The program name is set to contextMenu)
      2. Set the regPath to your desired Registry path.
      3. When it executes the MsgBox, check if the command is added to the Registry in the address bar.
    4. CreateStartupShortcut: Label creates the shortcut of the main program Open With Chrome.exe in Startup folder.

Add To Context Menu And Create Startup Shortcut.ahk

; =============Recommended Settings=============
#NoEnv
SetWorkingDir %A_ScriptDir%
#Warn
CoordMode, Mouse, Window
SendMode Input
#SingleInstance Force
SetTitleMatchMode 2
SetTitleMatchMode Fast
DetectHiddenWindows Off
DetectHiddenText On
#WinActivateForce
#NoTrayIcon
SetControlDelay 1
SetWinDelay 0
SetKeyDelay -1
SetMouseDelay -1
SetBatchLines -1
#Persistent
#MaxThreadsPerHotkey 2
; =============Recommended Settings=============

AddToContextMenuAndCreateStartupShortcut: RunAsAdmin: ; =============RunAsAdmin============= If (!A_IsAdmin) ; IF NOT Admin { Run, *RunAs "%A_ScriptFullPath%" ; Run script as admin ExitApp ; Exit the current instance running without admin privileges } ContextMenuCreateFile: ; =============ContextMenuCreateFile============= contextMenuCreateFileAhk := (LTrim "#NoEnv #NoTrayIcon #SingleInstance Force SetWorkingDir %A_ScriptDir% SetBatchLines -1

ContextMenuCreateFile: FileDelete, reg.txt FileAppend, , reg.txt ExitApp Return" ) ; contextMenuCreateFileAhk FileDelete, Context Menu Create File.exe ; DEL Context Menu Create File.exe FileDelete, Context Menu Create File.ahk ; DEL Context Menu Create File.ahk FileAppend, %contextMenuCreateFileAhk%, Context Menu Create File.ahk ; MAKE Context Menu Create File.ahk RunWait, C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe /in "Context Menu Create File.ahk" /out "Context Menu Create File.exe" ; Convert AHK to EXE FileDelete, Context Menu Create File.ahk ; DEL Context Menu Create File.ahk AddToContextMenu: ; =============AddToContextMenu============= path := "" ; path program := "Context Menu Create File" ; program contextMenu := "Open With Chrome" ; contextMenu regPath := "HKCR*\shell" ; regPath StringReplace, regKey, contextMenu, %A_Space%, , A ; regKey regKey := 0 regKey ; regKey Loop, Files, %program%.exe, F ; Find Program.exe In Current Dir { path := A_LoopFileLongPath ; Set Program Path } cmd := (LTrim "reg add """ regPath "" regKey """ /ve /t REG_SZ /d """ contextMenu """ /f reg add """ regPath "" regKey "\command"" /ve /t REG_SZ /d """"" path """`"" /f" ) ; Registry FileDelete, Add To Context Menu.bat ; CREATE Add To Context Menu.bat FileAppend, %cmd%, Add To Context Menu.bat ; CREATE Add To Context Menu.bat RunWait, Add To Context Menu.bat, , Hide ; RUN Add To Context Menu.bat (*RunAs ADMIN) FileDelete, Add To Context Menu.bat ; DEL Add To Context Menu.bat Run, regedit ; regedit WinWait, Registry Editor ahk_class RegEdit_RegEdit ahk_exe regedit.exe ; Registry Sleep, 333 ControlSetText, Edit1, %regPath%%regKey%\command, Registry Editor ahk_class RegEdit_RegEdit ahk_exe regedit.exe ; regPath ControlFocus, Edit1, Registry Editor ahk_class RegEdit_RegEdit ahk_exe regedit.exe ; regPath ControlSend, Edit1, {Enter}, Registry Editor ahk_class RegEdit_RegEdit ahk_exe regedit.exe ; regPath ControlSend, SysListView321, {Control Down}{NumpadAdd}{Control Up}, Registry Editor ahk_class RegEdit_RegEdit ahk_exe regedit.exe ; regPath ControlSend, SysListView321, {F5}, Registry Editor ahk_class RegEdit_RegEdit ahk_exe regedit.exe ; regPath MsgBox, 262192, CHECK, Check If Added %contextMenu% To Registry ; CHECK CreateStartupShortcut: ; =============CreateStartupShortcut============= path := "" ; path program := contextMenu ; program Loop, Files, %program%.exe, F ; Find Program.exe In Current Dir { path := A_LoopFileLongPath ; Set Program Path } FileCreateShortcut, %path%, %A_Startup%%program%.lnk ; Create Startup Shortcut Run, %A_Startup%, , Max ; Check If Shortcut Created Run, "%program%.exe" ; Run Program MsgBox, 262144, CHECK, Check If Shortcut Created ; CHECK ExitApp ; ExitApp Return

  1. Create 2nd program Open With Chrome.ahk which is the main program.
    1. Here a Loop is created and checks every 1 second if reg.txt exists.
    2. IfExist, reg.txt it kills the Context Menu Create File.exe and deletes the reg.txt.
    3. Then it activates explorer.exe window and copies all selected file paths to CLIPBOARD.
    4. If CLIPBOARD contains .,\ to make sure CLIPBOARD contains path "\" with extension ".".
    5. The list of selected files is saved in selectedFiles variable.
    6. The Loop below chromeParams := "" loops through selected files, gets the filePaths and surrounds them with double quotes, and StringReplace replaces the Windows path as url file path ex: C:\path\file.jpg to file:///path/file.jpg.
    7. Then the filePath is concatenated to chromeParams.
    8. StringTrimRight removes the last space from chromeParams string.
    9. Then Run, chrome.exe %chromeParams% is executed with %chromeParams% (list of selected files). (If the command doesn't open Chrome then put full path to Chrome, ex: Run, C:\Program Files (x86)\Google\Chrome\Application\chrome.exe with the same parameters)

Open With Chrome.ahk

; =============Recommended Settings=============
#NoEnv
SetWorkingDir %A_ScriptDir%
#Warn
CoordMode, Mouse, Window
SendMode Input
#SingleInstance Force
SetTitleMatchMode 2
SetTitleMatchMode Fast
DetectHiddenWindows Off
DetectHiddenText On
#WinActivateForce
#NoTrayIcon
SetControlDelay 1
SetWinDelay 0
SetKeyDelay -1
SetMouseDelay -1
SetBatchLines -1
#Persistent
#MaxThreadsPerHotkey 2
; =============Recommended Settings=============

OpenWithChrome: Loop ; Loop Start { Sleep, 1000 ; Fix High CPU IfExist, reg.txt ; IF reg.txt EXIST { RunWait, cmd /c taskkill /im "Context Menu Create File.exe" /f, , Hide ; Fix Opening 2 Compose Windows FileDelete, reg.txt ; DEL reg.txt WinActivate, ahk_class CabinetWClass ahk_exe explorer.exe ; Explorer CLIPBOARD := "" ; Clear Clipboard Send, {Control Down}{c}{Control Up} ; Copy File Paths ClipWait, 0 ; Clip Wait If CLIPBOARD contains .,\ ; IF CLIPBOARD contains .,
{ selectedFiles := CLIPBOARD ; selectedFiles chromeParams := "" ; chromeParams Loop, Parse, selectedFiles, n,r ; Loop Start selectedFiles { filePath := """file:///" A_LoopField """" ; filePath StringReplace, filePath, filePath, , /, A ; Replace \ with / chromeParams .= filePath . " " ; chromeParams .= %filePath%, } StringTrimRight, chromeParams, chromeParams, 1 ; Remove Last Space Run, chrome.exe %chromeParams% ; Open Files In Chrome } } } Return

  1. Convert both Add To Context Menu And Create Startup Shortcut.ahk and Open With Chrome.ahk to EXE files in the same directory using Ahk2Exe.exe --> (find in Start Menu, just browse file and hit convert)

  2. Execute the Add To Context Menu And Create Startup Shortcut.exe

  3. Select files, right click and the Open With Chrome context menu item should appear.