How can I create a desktop shortcut for a Windows 10 Universal app using powershell?

后端 未结 4 1182
情话喂你
情话喂你 2021-01-14 14:21

I have a UWP app I created and want to use powershell to create a shortcut on the desktop.

Creating a shortcut is easy for an exe

$TargetFile =  \"\\         


        
4条回答
  •  -上瘾入骨i
    2021-01-14 15:23

    To determine the correct TargetPath https://www.tenforums.com/software-apps/57000-method-open-any-windows-10-apps-command-line.html documents the required steps:

    List all applications via Powershell: get-appxpackage > %TEMP%\application_list.txt

    Open list: notepad %TEMP%\application_list.txt

    Find the PackageFamilyName for your app and navigate to the application's InstallLocation using Windows Explorer

    Opening the AppxManifest.xml shows the Application ID: for the executable.

    Combine the PackageFamilyName!ApplicationID to form your TargetPath

    Microsoft.WinDbg_8wekyb3d8bbwe!Microsoft.WinDbg.DbgSrv64 for WinDbg Preview for instance.

提交回复
热议问题