小编Ner*_*lle的帖子

从启动时以管理员身份运行快捷方式

我在Startup文件夹中创建了快捷方式.是否可以通过wix为我的快捷方式添加"以管理员身份运行"属性?我的代码:

<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>
Run Code Online (Sandbox Code Playgroud)

wix shortcut

6
推荐指数
1
解决办法
4749
查看次数

如何根据属性值安装功能

我有一个注册表项,可以等于两个值之一:特殊值null.还有两个功能.

当我的注册表项等于特殊值时,安装程序必须安装第一个功能.如果注册表搜索未找到注册表项,则安装程序必须安装第二个功能.如果注册表项具有值,则安装程序不得安装这两个功能中的任何一个.

我在做什么或者理解错了什么?如果INSTALLLEVEL = 5,SPECIALVALUE ="special",MYTREAT ="1",则必须安装第一个功能,但在这种情况下安装程序不会安装这两个功能.

<Feature Id="MyFeatures" Level="1" ConfigurableDirectory='INSTALLLOCATION' Display='expand' AllowAdvertise='no'>

  <ComponentRef Id='Empty'/>

  <Feature Id='First' Level='3' AllowAdvertise='no' ConfigurableDirectory='INSTALLLOCATION'>
    <Condition Level="0">INSTALLLEVEL=4 OR (MYTREAT="1" AND NOT SPECIALVALUE AND NOT SPECIALVALUE="")</Condition>
    <Condition Level="1">SPECIALVALUE="special" AND MYTREAT="1"</Condition>
    <ComponentRef Id="first_comp"/>                 
  </Feature>

  <Feature Id="Second" Level="4" AllowAdvertise="no" ConfigurableDirectory="INSTALLLOCATION">
    <Condition Level="0">INSTALLLEVEL=3 OR (MYTREAT="1" AND SPECIALVALUE)</Condition>
    <ComponentRef Id="second_comp"/>
  </Feature>

</Feature>
Run Code Online (Sandbox Code Playgroud)

我修改了我的代码,但它仍然无法正常工作.条件问题.注册表项中有一个特殊值,但安装程序仍在跳过第一个功能.我发现只有"MYTREAT = 1"的条件不起作用.但是在日志中,客户端正在向服务器发送带有此值的MYTREAT属性.INSTALLLEVEL为1.使用按钮控件初始化MYTREAT属性,这可能是我的麻烦吗?这里有新代码:

     <Feature Id="Myfeatures" Level="3"
            ConfigurableDirectory='INSTALLLOCATION'
            Display='expand' AllowAdvertise='no'>
                <Condition Level='1'>MYTREAT="1"</Condition>
                <ComponentRef Id='Empty'/>
                <Feature Id='First' Level='3' AllowAdvertise='no'
                    ConfigurableDirectory='INSTALLLOCATION'> <!--Must be …
Run Code Online (Sandbox Code Playgroud)

wix conditional-statements

6
推荐指数
1
解决办法
1万
查看次数

如何修复ICE57.Per-User安装

我们的应用程序在运行时将一些设置写入注册表到HKCU配置单元.我想在卸载期间删除此设置.这是代码:

  <Fragment>
    <DirectoryRef Id="INSTALLLOCATION" DiskId="1" FileSource="$(var.SourceDirProject)\">
      <Component Id="DeleteHkcuManufacturerHive" Guid="GUID">
        <Condition>REMOVE="ALL" AND NOT UPGRADINGPRODUCTCODE</Condition>
        <CreateFolder/>
        <RemoveRegistryKey Action="removeOnUninstall"
 Id="HKCUkey" Root="HKCU" Key="Software\$(var.Manufacturer)"/>
      </Component>
    </DirectoryRef>
  </Fragment>
Run Code Online (Sandbox Code Playgroud)

ICE57:组件'DeleteHkcuManufacturerHive'具有每台用户和每台机器数据以及每台机器的KeyPath.
为什么我得到ICE57?安装是按用户进行的.提前致谢.

UPD:这里的每台机器元素在哪里?可能是INSTALLLOCATION = Program Files\ManufacturerDirectory?

wix wix3.6

6
推荐指数
2
解决办法
6362
查看次数

5
推荐指数
1
解决办法
1807
查看次数

如何使用预处理器变量管理Bundle的代码?

我在Visual Studio中的bundle-project上创建了几个配置,我想定义每个配置中必须包含哪些代码片段.我的目标是获得几个bootstrappers:其中一些将包括先决条件,一些不会.我尝试过类似的东西:

<PackageGroup
       Id="Prerequisites">
      <?if $(Configuration)='Release'?>
      <ExePackage
        Id="Netfx4Client"
        Cache="yes"
        Compressed="yes"
        PerMachine="yes"
        Permanent="yes"
        Vital="yes"
        SourceFile=".\SupportFiles\dotNetFx40_Client_x86_x64.exe"
        DetectCondition="NETFRAMEWORK40CLIENT OR (VersionNT64 AND NETFRAMEWORK40CLIENTX64)"
        InstallCondition="(v4.0.30319 > NETFRAMEWORK40CLIENT OR NOT NETFRAMEWORK40CLIENT)  OR (VersionNT64 AND v4.0.30319 > NETFRAMEWORK40CLIENTX64 OR NOT NETFRAMEWORK40CLIENTX64)"
        InstallCommand="/q /norestart  /log [TempFolder]\dotnetframework4.log"/>
<?endif?>
Run Code Online (Sandbox Code Playgroud)

但当然这是不正确的..是否有可能根据任何变量管理哪些代码片段将被包含在Bundle的包中?谢谢.

wix burn votive

5
推荐指数
1
解决办法
1180
查看次数

次要升级要求

我想使用小升级,但我对这种升级的要求有两个问题.

可能吗:

  1. 从仅在一个现有功能中共享的组件中删除文件(而不是KeyPath)(并且在删除组件后仍然不为空)?
  2. 删除现有组件(我猜它会违反规则)?

感谢帮助!

wix upgrade

3
推荐指数
1
解决办法
630
查看次数

如果按下按钮,如何设置要安装的功能列表?

我正在使用WixUI_Mondo套装.我修改了"CompleteButton"按钮SetupTypeDlg:

<Control Id="ServerButton" Type="PushButton" X="40" Y="120" Width="80" Height="17" ToolTip="!(loc.SetupTypeDlgServerButtonTooltip)" Text="!(loc.SetupTypeDlgServerButton)">
   <Publish Property="WixUI_InstallMode" Value="InstallServer">1</Publish>                  
   <Publish Property="SERVICE" Value="[SERVSTR]">1</Publish>
   <Publish Property="ADDLOCAL" Value="Feature1,Feature2,Feature3">1</Publish>
</Control>

<Property Id="ADDLOCAL" Secure="yes"></Property>
Run Code Online (Sandbox Code Playgroud)

当我按下ServerButton日志时说:

(CLIENT)     MSI (c) (1C:88) [15:28:49:154]: PROPERTY CHANGE: Adding ADDLOCAL property. Its value is 'Feature1,Feature2,Feature3'. 
(UNKNOWN)     ???????? 15:28:49: ServStrDlg. Dialog created 
(UNKNOWN)     ???????? 15:28:53: ShortsDlg. Dialog created 
(UNKNOWN)     ???????? 15:28:55: VerifyReadyDlg. Dialog created 
(CLIENT)     MSI (c) (1C:88) [15:28:55:966]: Note: 1: 2727 2: 
(UNKNOWN)     ???????? ????????? 15:28:56: WelcomeDlg. ??? ???????? 1. 
(CLIENT) …
Run Code Online (Sandbox Code Playgroud)

wix

3
推荐指数
1
解决办法
3193
查看次数

删除有关已安装产品的信息

我有一个小问题.

在卸载过程中,哪个操作会删除已安装的产品信息(通过PublishProduct操作广告)?

提前致谢.

windows-installer wix

1
推荐指数
1
解决办法
359
查看次数