问题
I have a Universal App that I'm sideloading in Windows10. I would like to create a script (Powershell, VBS, batch, etc) to pin it to the Start Menu.
I have found many examples of how to write a script that pins a desktop application (like this one: https://gallery.technet.microsoft.com/scriptcenter/Script-to-pin-items-to-51be533c ). I've tried using the script to pin the actual App .exe file located in C:\Program Files\WindowsApps... but that doesn't work. When I try and pin that way, I run DoIt(), which doesn't return anything. There are no error messages, but the tile is not pinned to the start menu.
My guess is that instead of using a ComObject to interact with the file system I need a ComObject that interacts with some sort of App manager. I'm not sure how to get a list of available ComObjects to tell if this is even a possibility.
来源:https://stackoverflow.com/questions/32359910/windows10-script-pin-app-to-start-menu