Run as administrator shortcut from start

I created a shortcut in the startup folder. Can I add the "Run as administrator" property for my shortcut via wix? here is my code:

<Component Id="AutostartService" Guid="GUID"> <Condition>AUTOSTART="1"</Condition> <RegistryKey Action="createAndRemoveOnUninstall" Root="HKCU" Key="Software\$(var.Manufacturer)\$(var.ProductName)\$(var.ApplicationName)"> <RegistryValue Name="ShortcutAutostart" Type="integer" Value="1" KeyPath="yes"> </RegistryValue> </RegistryKey> <Shortcut Advertise="no" Directory="StartupFolder" Name="Service" Target="[INSTALLLOCATION]Service.exe" Id="SHORTCUT_auto" WorkingDirectory="INSTALLLOCATION" > </Shortcut> <RemoveFile Id="remove_autostart" Name="Service" On="uninstall"/> </Component> 
+6
source share
1 answer

No, it is not supported because it is the "wrong thing."

+2
source

Source: https://habr.com/ru/post/897149/


All Articles