Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run as admin the shortcut from startup

Tags:

shortcut

wix

I created shortcut in the Startup folder. Is it possible to add "Run as administrator" property for my shortcut by wix? here 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>
like image 278
Nerielle Avatar asked Sep 12 '11 13:09

Nerielle


1 Answers

No, it's not supported, because it's "the wrong thing to do."

like image 79
Bob Arnson Avatar answered Nov 03 '22 15:11

Bob Arnson