开发者

Run as admin the shortcut from startup

开发者 https://www.devze.com 2023-04-04 12:09 出处:网络
I created shortcut in the Startup folder. Is it possible to add \"Run as administrator\" property for my shortcut by wix? here my code:

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"
                    开发者_Python百科   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>


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

0

精彩评论

暂无评论...
验证码 换一张
取 消