External UI and shortcuts.

Nov 25, 2015 at 5:03 PM
Hello to everyone.

First of all I want apologize for possible mistakes in terminology, I'm a linux adept.

I'm working on a small installer project for the system application(some drivers, windows service, etc.). Installer has a pretty custom GUI, with several REST API calls and non-standard graphics, so I decided to use external WPF and faced a problem with shortcuts. As far as I understand, it's required for the installer to run with administrator privileges to install services and drivers.

So, the problem is: when I'm testing MSI without external GUI support then all the shortcuts are created normally, but when I'm switching to the WPF then ExeFileShortcut fails and shortcuts doesn't fall into Start menu.

Any ideas?

Thanks a lot!
Nov 26, 2015 at 4:20 AM
Probably the easiest solution would be to force your external UI exe to run elevated. You can do this by embedding the corresponding application manifest into your exe (VS has a check box for this). Or you can do it an old fashion way by restarting itself on startup with the elevation requested.