Open Windows 10 Photos app from command line

In Windows 10, suppose you have several png files in a folder. If you use the File Explorer to click one, the Photos app opens. And, the right/left arrow keys let you move to the next/previous image. Also, if you hover over the right/left side of the image, it displays "Next"/"Previous", and you can click to move to the next/previous image.

If you type the name of the png file at the command line, the Photos app opens, but it does not let you move to the next/previous image. Is there some way to open it from the command line so it will work like when you click the file?

TCC 27.00.20 x64 Windows 10 [Version 10.0.17134.2026]
 
May 26, 2008
537
4
I was able to confirm the behavioral difference David is seeing. It's not a TCMD issue, same thing happens when you "run" an image file from powershell or cmd. Something special happens when it's launched from Explorer. Not sure how to replicate that behavior from a command prompt yet.
 
May 20, 2008
11,388
99
Syracuse, NY, USA
I have a SHELLEX.EXE which does this. If you want to try it, copy "ftp://vefatica.net/shellex.zip"
1613610720865.png
 
May 26, 2008
537
4
I tried ShellExecute from a vbs script but it didn't give me the next/prev buttons. Your ShellEx application does?
 
May 20, 2008
11,388
99
Syracuse, NY, USA
It didn't work for me either. But what's funny ... Here's the command line when I 2-click on a JPG (and I get the Next/Previous buttons).

Code:
"C:\Program Files\WindowsApps\Microsoft.Windows.Photos_2019.19071.17920.0_x64__8wekyb3d8bbwe\Microsoft.Photos.exe" -ServerName:App.AppXzst44mncqdg84v7sv6p7yznqwssy6f7f.mca

And here's the command line when it's started by SHELLEX.EXE (and I don't get the buttons).

Code:
"C:\Program Files\WindowsApps\Microsoft.Windows.Photos_2019.19071.17920.0_x64__8wekyb3d8bbwe\Microsoft.Photos.exe" -ServerName:App.AppXzst44mncqdg84v7sv6p7yznqwssy6f7f.mca
 
So, you still can't get it to work from the command line?

I found the following. It works to start the Photos app, but I can't pass the filename to it to get it to open the photo.


 
May 26, 2008
537
4
I also found this:


you can "start ms-photos:" and it launches the Photos app. According to that document, you can use a custom URI like:

Code:
start ms-photos:viewer?fileName=c:\users\userName\Pictures\image.jpg

But it didn't work for me. I'm guessing the documentation is out of date. Very few hits if you try to Google this URI usage.
 
May 20, 2008
11,388
99
Syracuse, NY, USA
Using "ms-photos;" with a file name didn't work for me either. But if, you start it like that, choose "folders" at the top, and add the folder in question, then the next time you "start ms-photos:viewer" you get thumbnails and if you view one of the files, you get the Next/Previous arrows.

If you start it some other way, like "start path\arnex4.JPG" and click "See all photos" you get the thumbnails (as above) and the arrows after opening one of the thumbnails.

In short, making the folder "known" helps.
 
Similar threads
Thread starter Title Forum Replies Date
D How to? V15.00.30 -(help!) - Floating view windows don't open Support 1
T Open & Configure multiple TCC windows on STARTUP Support 4
Phileosophos Is there any way to open the Take Command options dialog from the command line? Support 8
R How to? Open Take Command at current folder Support 7
D everything /o does not open the option dialog Support 4
A How to? How do you launch TCC/LE using the already-open instance? Support 5
David Wilbanks How to make new tab open in same directory as previous tab? Support 4
C OT: Registry OPEN verb to start elevated... Support 2
epement Fixed Row/Col status bar flips continuously when 2 files open Support 4
S How to? Use Forum "feedback" button to open in a new tab Support 3
Mordachai Fixed Closing TCMD while IDE + Help Open = Crash Support 7
C How to? Shell Window remains open Support 6
vefatica Open properties for .LNK? Support 16
Charles Dye IFTP, current directory, open new connection Support 0
E WAD Open handle on USB drive in TCC Support 3
R How to? can not open jvm.cfg help Support 2
fishman@panix.com Is there a way to get the HELP screen to open maximized? Support 4
daniel347x Open a bash shell in Take Command? Support 2
MBaas GUI-Tool for "File/Open" or tree (for use in batch-files) Support 3
P TCMD 11.0.28 does not open its window Support 15
M open Take Command here right-click? Support 2
CWBillow Context Menu "Open With" Support 10
J Crash on Windows 10 Support 0
thorntonpg windows 11 Support 9
vefatica Windows 10 themes Support 0
J Take command does not start on Windows 10 Support 3
D How to? Windows Key-Left and Windows Key-Right Support 9
Joe Caverly PYTHON from Microsoft Windows Store Support 2
vefatica Windows Terminal ... Pop-up location Support 1
Joe Caverly Windows Terminal and @SELECT Support 13
vefatica Console popup windows don't work correctly Support 0
D Layout debugger windows Support 2
L LIST's pop-up search loses focus in a Windows Terminal window Support 15
nickles ANSI Colors Windows 7 no longer working Support 6
S Windows Server version not being detected correctly in TCMD 26RC2 Support 9
D Which is the latest version for Windows XP? Support 2
rconn News Windows 7 Support Support 0
Joe Caverly Windows Size is 80x0 Support 2
rconn Dropping Windows 7 support in Take Command / TCC v26 Support 8
G Taskbar Windows 10 Support 7
T Windows Terminal Support 2
Joe Caverly Windows Sensor Support 5
vefatica Windows 10 and line wrapping selection? Support 6
fishman@panix.com New Problem with later Windows 10 Support 10
CWBillow Upgrade Windows 10's effect on TCMD and TCC Support 3
T Take Command v21 on Windows Server Support 1
Bill de Haan "Sensitive Privilege Use" in Windows security auditing Support 7
Joe Caverly Create Windows Jobs and optionally attach processes to a job Support 17
Joe Caverly What version and Windows OS are you using? Support 3
A Windows 10 This app can't run on your PC Support 2

Similar threads