leanid.chaika
leanid.chaika

Reputation: 2432

how to start windows 10 appx (UWP) application from terminal (cmd)

I have developer machine with Visual Studio 2015 on Windows 10 Desctop and build UWP application (custom Unit Tests) in debug mode. I want to run debugged version of my UnitTests so try to start my Appx from python script (or just cmd.exe), but see only:

C:\Users\l_chayka\job_builds\unit_tests_win10\Debug>UnitTests.exe
The system cannot execute the specified program.

If I start Appx from Visual Stidio all works good, what should I do to make debugged version of UWP application start from terminal? Thanks in advance.

Upvotes: 1

Views: 4488

Answers (1)

Fangfang Wu - MSFT
Fangfang Wu - MSFT

Reputation: 1072

There are several ways to start appx from command line:

1.Using window's startup menu. You can refer to Diogo's reply in this post. The syntax is like below. You can save to a vbs script and run in command line:

Set objShell = WScript.CreateObject("WScript.Shell")

objShell.SendKeys "^{ESC}"

WScript.Sleep 1000

objShell.SendKeys WScript.Arguments.Item(0)

WScript.Sleep 1000

objShell.SendKeys "{ENTER}"
  1. Using explorer.exe ( IE10)to launch the deployed app, such like this: "explorer.exe bingnews://". You can refer to this post.

  2. Programming to implement IApplicationActivationManager interface to load app. This is also based on window's registry keys to find the effective APPID. Detailed code could be find in this post.

Hope this can help!

Upvotes: 2

Related Questions