Windows 10 Command Prompt Shortcuts


  1. Posts : 3
    windows 10 Professional 64Bit
       #1

    Windows 10 Command Prompt Shortcuts


    I execute the following shortcut from the command prompt in Windows 10:

    explorer.exe shell:appsFolder\Microsoft.Windows.Photos_8wekyb3d8bbwe!App

    and it works fine. The new Windows Photos app main page shows up, ready to be used.

    I want to pass a file name as an argument (say abc.jpg) so that the app opens with that file image.
    I have 2 questions:

    1. Is that possible?
    2. If yes, what is the correct syntax to pass the argument?

    Thanks for your help.
      My Computer


  2. Posts : 210
    Windows10
       #2

    In earlier versions of Windows, just putting it at the end of the target line worked:
    eg. explorer.exe shell:appsFolder\Microsoft.Windows.Photos_8wekyb3d8bbwe!App "mypic.jpg"
      My Computer


  3. Posts : 14,046
    Windows 11 Pro X64 22H2 22621.1848
       #3

    Doesn't work for me, just opens explorer.exe.
    Last edited by Ztruker; 13 Sep 2015 at 20:23.
      My Computers


  4. Posts : 419
    Win 7 Pro/32, Win 10 Pro/64/32
       #4

    Why so much work to perform such a simple task?
      My Computer


  5. Posts : 3
    windows 10 Professional 64Bit
    Thread Starter
       #5

    Thanks for the interest.


    I posted the same question in Microsoft Windows 10 forum and the answer I got is:
    "It is not possible. The universal/store apps do not accept any command line arguments."

    Why? I was trying to give the users of a VB program the ability to edit an image using the app by clicking on the image.
      My Computer


  6. Posts : 14,046
    Windows 11 Pro X64 22H2 22621.1848
       #6

    What about right clicking on the image and select Open with ...
      My Computers


  7. Posts : 265
    Windows 10 Enterprise
       #7

    If you're using VB and you select an image, it will open with the default application that is associated with the file extension. For example, from the Start RUN, I typed in c:\temp\test.jpg and hit enter. It opened the file with MsPaint, which was my default for jpg files. I then switched the default of jpg files to use the photo viewer and this time when I typed in c:\temp\test.jpg the file opend with the photo viewer. Again, I did this from a Windows 7 workstation and will try this experiment tonight using a Windows 10 workstation...but I expect the same results.
      My Computer


  8. Posts : 3
    windows 10 Professional 64Bit
    Thread Starter
       #8

    Solution Found


    Play2mefish:
    You are correct, but I am not using a VB program, I am trying to improve a VB program I wrote. In VB, as in any other language, to determine what happens when a user clicks on anything you need to code it.
    So even if typing c:\test.jpg in the RUN line works, as long as the default program for jpg file is the Photos App, it does not work that way in VB code.
    However, your suggestion, and Ztruker's, pointed me towards a solution. Buttons in VB have a HyperlinkAddress property and if I make it c:\test.jpg it does work when the user clicks on the button, as long as the default program for jpg file is the Photos App. This is not a very flexible or elegant solution, but it is one.
    Thank all for your time.
      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 05:22.
Find Us




Windows 10 Forums