小编Pet*_*te 的帖子

如何使用 powershell 为 Windows 10 通用应用程序创建桌面快捷方式?

我有一个我创建的 UWP 应用程序,想使用 powershell 在桌面上创建一个快捷方式。

为exe创建快捷方式很容易

$TargetFile =  "\Path\To\MyProgram.exe"
$ShortcutFile = "$env:USERPROFILE\Desktop\MyShortcut.lnk"
$WScriptShell = New-Object -ComObject WScript.Shell
$Shortcut = $WScriptShell.CreateShortcut($ShortcutFile)
$Shortcut.TargetPath = $TargetFile
$Shortcut.Save()
Run Code Online (Sandbox Code Playgroud)

但是我正在为通用应用程序的目标使用什么而苦苦挣扎。

powershell uwp

5
推荐指数
2
解决办法
8943
查看次数

标签 统计

powershell ×1

uwp ×1