1. Joined : Sep 2015
    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 System SpecsSystem Spec


  2. Joined : Aug 2015
    Posts : 71
    Windows10
       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 System SpecsSystem Spec


  3. Joined : Apr 2014
    Space coast of Florida
    Posts : 4,329
    Windows 10 Pro X64 14393.576
       13 Sep 2015 #3

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


  4. Joined : Nov 2013
    Central Florida
    Posts : 322
    Win 7 Pro/32, Win 10 Pro/64/32
       13 Sep 2015 #4

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


  5. Joined : Sep 2015
    Posts : 3
    windows 10 Professional 64Bit
       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 System SpecsSystem Spec


  6. Joined : Apr 2014
    Space coast of Florida
    Posts : 4,329
    Windows 10 Pro X64 14393.576
       14 Sep 2015 #6

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


  7. Joined : Oct 2014
    Posts : 117
    Windows 10 Enterprise
       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 System SpecsSystem Spec


  8. Joined : Sep 2015
    Posts : 3
    windows 10 Professional 64Bit
       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 System SpecsSystem Spec


 


Similar Threads
Thread Forum
Elevated Command Prompt - Open in Windows 10
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...
Tutorials
Command Prompt at Boot - Open in Windows 10
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...
Tutorials
Command Prompt - Open in Windows 10
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...
Tutorials
Command Prompt gets welcome improvements in Windows 10
Read more...
Windows 10 News
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 17:18.
Find Us
Twitter Facebook Google+



Windows 10 Forums