1.    13 Sep 2015 #1
    Join Date : Sep 2015
    Posts : 3
    windows 10 Professional 64Bit

    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
    Join Date : Aug 2015
    Posts : 89
    Windows10

    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.    13 Sep 2015 #3
    Join Date : Apr 2014
    Space coast of Florida
    Posts : 5,372
    Windows 10 Pro X64 16299.19

    Doesn't work for me, just opens explorer.exe.
    Last edited by Ztruker; 13 Sep 2015 at 20:23.
      My ComputersSystem Spec
  4.    13 Sep 2015 #4
    Join Date : Nov 2013
    Central Florida
    Posts : 346
    Win 7 Pro/32, Win 10 Pro/64/32

    Why so much work to perform such a simple task?
      My ComputerSystem Spec
  5.    14 Sep 2015 #5
    Join Date : Sep 2015
    Posts : 3
    windows 10 Professional 64Bit
    Thread Starter

    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.    14 Sep 2015 #6
    Join Date : Apr 2014
    Space coast of Florida
    Posts : 5,372
    Windows 10 Pro X64 16299.19

    What about right clicking on the image and select Open with ...
      My ComputersSystem Spec
  7.    14 Sep 2015 #7
    Join Date : Oct 2014
    Posts : 168
    Windows 10 Enterprise

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

    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

 


Similar Threads
Thread Forum
General Tips Open Command Prompt 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
General Tips Open Elevated Command Prompt 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
General Tips Open Command Prompt at Boot 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 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 14:08.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums