How to start Microsoft Photos from command line?

Page 1 of 2 12 LastLast

  1. Posts : 69
    Windows 10 Pro x64
       #1

    How to start Microsoft Photos from command line?


    Hi!
    In Windows 10 is new app for photos and albums as default picture viewer.
    In Windows 8.1 I used JPEGView, and sometimes Windows Photo Viewer.
    Now I'm customizing Windows and I know how to start Photo Viewer from cmd and created context menu item.
    I want to associate pictures again to JPEGView and have context menu item for Windows 10 Photos, so, how to run Photos from command line?

    Thank you for every help.
    Miro
      My Computer


  2. Posts : 42,734
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    Sure you've got the answer by now.. anyway, here's how you can launch the photos app from a cmd prompt
    explorer.exe shell:appsFolder\Microsoft.Windows.Photos_8wekyb3d8bbwe!App
    or
    start ms-photos:
      My Computers


  3. Posts : 69
    Windows 10 Pro x64
    Thread Starter
       #3

    Thank you! Works!

    But how to use "%1" parameter or filename? When I try anything, also not real path, it always opens MyDocuments.

    Miro
      My Computer


  4. Posts : 42,734
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #4

    These 'universal' apps aren't characterised like exe's to use params, it seems. So you can launch them from a command line or powershell, for example, but not with a parameter.
      My Computers


  5. Posts : 69
    Windows 10 Pro x64
    Thread Starter
       #5

    So, how it opens image clicked on?
      My Computer


  6. Posts : 42,734
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #6

    I think you mean 'How does it open an image when you click on it?' - well, the problem seems to be that these are not well documented from what I've read. So, you can create shortcuts to them (but not in the normal way) - I know of two ways- and 'open with' allows you to freely change the association between a desktop app and photos.

    But if you look at this:
    How to start Microsoft Photos from command line?-photos-association.jpg
    you will see there is no path to the Photos app as you would expect for a 'desktop' exe.

    It would seem there is a different mechanism in effect.
      My Computers


  7. Posts : 69
    Windows 10 Pro x64
    Thread Starter
       #7

    I can try make it same way like shortcuts to Libraries, Computer, God Mode...
    If it will work I'll reply.
    Miro
      My Computer


  8. Posts : 42,734
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #8

    A thought which probably isn't worth the effort of exploring: start with the question- where is the location opened by Photos as default defined? For example, if it were in the registry, one 'might' be able to write a script that has as parameter what you want to open. That parameter is used to overwrite the default location which Photos would open. Then the script launches Photos. (And rewrites the default location to tidy up).

    Even if the location is defined in the registry, overwriting it might not be effective without logging out, in, which would make the whole idea pretty useless! and if it's hard coded, well, no chance.

    Really not worth the effort to explore...!
      My Computers


  9. Posts : 69
    Windows 10 Pro x64
    Thread Starter
       #9

    Yes, registry manipulating script is maybe only one way, I tried written in post before your and nothing helped.
    Sure is that it must to be possible 'cause if it works when are file associations default, then it's not impossible!

    Miro
      My Computer


  10. Posts : 27
    Windows 10
       #10

    Good Image Viewer that works from the command line


    The most useful image viewer I found that works from the command line is ArtSage (ArtSage).
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:04.
Find Us




Windows 10 Forums