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

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


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