Windows 10: Windows 10 Command Prompt Shortcuts


  1. Posts : 3
    windows 10 Professional 64Bit
       13 Sep 2015 #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 ComputerSystem Spec

  2.    13 Sep 2015 #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 ComputerSystem Spec


  3. Posts : 5,007
    Windows 10 Pro X64 15063.138
       13 Sep 2015 #3

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


  4. Posts : 324
    Win 7 Pro/32, Win 10 Pro/64/32
       13 Sep 2015 #4

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


  5. Posts : 3
    windows 10 Professional 64Bit
    Thread Starter
       14 Sep 2015 #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 ComputerSystem Spec


  6. Posts : 5,007
    Windows 10 Pro X64 15063.138
       14 Sep 2015 #6

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

  7.    14 Sep 2015 #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 ComputerSystem Spec


  8. Posts : 3
    windows 10 Professional 64Bit
    Thread Starter
       15 Sep 2015 #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 ComputerSystem Spec


 

Related Threads
How to Open an Elevated Command Prompt in Windows 10 A command prompt is an entry point for typing computer commands in the Command Prompt window. By typing commands in an elevated command prompt, you can perform tasks that require...
General Tips Open Command Prompt in Windows 10 in Tutorials
How to Open a Command Prompt in Windows 10 A command prompt is an entry point for typing computer commands in the Command Prompt window. By typing commands at the command prompt, you can perform tasks on your computer without using the Windows...
How to Open a Command Prompt at Boot in Windows 10 A command prompt is an entry point for typing computer commands in the Command Prompt window. By typing commands at the command prompt, you can perform tasks on your computer without using the...
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