How to install a desktop shortcut (to a batch file) from a WiX-based installer that has “Run as Administrator” enabled?

后端 未结 1 1584
梦谈多话
梦谈多话 2021-02-15 11:18

I\'m installing a desktop shortcut (to a batch file) from a WiX-based installer -- how do I automatically configure this shortcut with the \"Run as Administrator\" setting enabl

相关标签:
1条回答
  • 2021-02-15 11:52

    I'm guessing you would need a custom action and call the COM interfaces on your own. Query IShellLink (or IPersistFile?) for IShellLinkDataList, then: IShellLinkDataList->SetFlags(orgFlagsFromGetFlags|SLDF_RUNAS_USER);

    Edit: Raymond has full sample code on his blog

    0 讨论(0)
提交回复
热议问题