{"id":7047,"date":"2020-05-26T22:36:44","date_gmt":"2020-05-26T20:36:44","guid":{"rendered":"https:\/\/michlstechblog.info\/blog\/?p=7047"},"modified":"2022-01-20T21:13:27","modified_gmt":"2022-01-20T20:13:27","slug":"windows-start-an-windows-app-from-command-line","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/windows-start-an-windows-app-from-command-line\/","title":{"rendered":"Windows: Start an Windows APP from command line"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_7047 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_7047')){$('.twoclick_social_bookmarks_post_7047').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Windows%3A%20Start%20an%20Windows%20APP%20from%20command%20line\",\"the_excerpt\":\"%0D%0AHi%2C%0D%0A%0D%0Athis%20post%20describes%20how%20to%20start%20a%20Windows%20App%20from%20command%20line.%20Windows%20Apps%20cannot%20be%20started%20by%20calling%20the%20exe%20file%20in%20the%20C%3A%5Cprogram%20files%5CWindowsApps%5Cxxx%20folder.%20This%20can%2Fmust%20be%20done%20my%20using%20the%20explorer.exe.%0D%0A%0D%0AThe%20Syntax%20is%0D%0A%0D%0A%0D%0AC%3A%5C%3E%20explorer.exe%20shell%3AappsFolder%5C%25PackageFamilyNameOfTheApp%25%21%25AppId%25%0D%0A%0D%0A%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/windows-start-an-windows-app-from-command-line\\\/\",\"post_id\":7047,\"post_title_referrer_track\":\"Windows%3A+Start+an+Windows+APP+from+command+line\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p><!-- https:\/\/answers.microsoft.com\/en-us\/windows\/forum\/windows_10-windows_store\/starting-windows-10-store-app-from-the-command\/836354c5-b5af-4d6c-b414-80e40ed14675 --><br \/>\nHi,<\/p>\n<p>this post describes how to start a Windows App from command line. Windows Apps cannot be started by calling the exe file in the C:\\program files\\WindowsApps\\xxx folder. This can\/must be done my using the explorer.exe.<\/p>\n<p>The Syntax is<\/p>\n<p><code><br \/>\nC:\\> explorer.exe shell:appsFolder\\%PackageFamilyNameOfTheApp%!%AppId%<br \/>\n<\/code><\/p>\n<p><!--more--><br \/>\nAn example the new Windows Terminal (must be installed of course \ud83d\ude42 ). Look for the package name<\/p>\n<p><code><br \/>\nPS D:\\> Get-AppxPackage | ?{$_.Name -match \"Terminal\"}<br \/>\nName              : Microsoft.WindowsTerminal<br \/>\nPublisher         : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US<br \/>\nArchitecture      : X64<br \/>\nResourceId        :<br \/>\nVersion           : 0.11.1121.0<br \/>\nPackageFullName   : Microsoft.WindowsTerminal_0.11.1121.0_x64__8wekyb3d8bbwe<br \/>\n<\/code><\/p>\n<p>Ok, Name is Microsoft.WindowsTerminal. Get the package<\/p>\n<p><code><br \/>\nPS D:\\> $oPackage=Get-AppxPackage Microsoft.WindowsTerminal<br \/>\n<\/code><\/p>\n<p>Get the manifest to determine the App ID. The AppID is the attribute &#8220;Id&#8221; of the XML node Package\/Applications\/Application in AppxManifest.xml.<br \/>\nRead the XML File as an XML object to $oApp<\/p>\n<p><code><br \/>\nPS D:\\> &#091;xml&#093;  $AppManifest=Get-Content ([System.IO.Path]::Combine($oPackage.InstallLocation,\"AppxManifest.xml\"))<br \/>\n<\/code><\/p>\n<p>Get the PackageFamilyName and the AppID<\/p>\n<p><code><br \/>\nPS D:\\> $PackageFamilyName=$oPackage.PackageFamilyName<br \/>\nPS D:\\> $AppId=$AppManifest.Package.Applications.Application.GetAttribute(\"Id\")<br \/>\nPS D:\\> Start-Process -FilePath \"explorer.exe\"   ([String]::Format(\"shell:appsFolder\\{0}!{1}\",$PackageFamilyName,$AppId))<br \/>\n<\/code><\/p>\n<p>Or for the Calculator<br \/>\n<code><br \/>\nPS D:\\&gt; $oPackage=Get-AppxPackage Microsoft.WindowsCalculator<br \/>\nPS D:\\&gt; &#091;xml&#093;$AppManifest=Get-Content ([System.IO.Path]::Combine($oPackage.InstallLocation,\"AppxManifest.xml\"))<br \/>\nPS D:\\&gt; Start-Process -FilePath \"explorer.exe\"   ([String]::Format(\"shell:appsFolder\\{0}!{1}\",$oPackage.PackageFamilyName,$AppManifest.Package.Applications.Application.GetAttribute(\"Id\")))<br \/>\n<\/code><\/p>\n<p>Michael <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, this post describes how to start a Windows App from command line. Windows Apps cannot be started by calling the exe file in the C:\\program files\\WindowsApps\\xxx folder. This can\/must be done my using the explorer.exe. The Syntax is C:\\> explorer.exe shell:appsFolder\\%PackageFamilyNameOfTheApp%!%AppId%<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,5,4],"tags":[1440,1431,1443,1444,1441,787,20,1442],"class_list":["post-7047","post","type-post","status-publish","format-standard","hentry","category-windows","category-windowsknowhow","category-windowsscripts","tag-app","tag-appx","tag-calc","tag-calculater","tag-from-command-line","tag-start","tag-windows-2","tag-windows-terminal"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/7047","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=7047"}],"version-history":[{"count":30,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/7047\/revisions"}],"predecessor-version":[{"id":7079,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/7047\/revisions\/7079"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=7047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=7047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=7047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}