Wix modify an existing ini file

2020-04-05 01:43发布

I was trying to modify an .ini file in Wix

If it does not exists, the msi does not complete....

  1. how do I check for this
  2. I really want to modify it

Yes I looked at other stackoverflow questions/answers and on google

I was trying this...

      <Component Id="TestIni" Guid="*">
        <CreateFolder />

        <IniFile Id="Ini1"
                 Action="createLine"
                 Directory="INSTALLLOCATION"
                 Section="Test"
                 Name="Minimal.ini"
                 Key="TestKey"
                 Value="TestValue" />

        <IniFile Id="Ini2"
                 Action="createLine"
                 Directory="WindowsFolder"
                 Section="Test"
                 Name="Minimal.ini"
                 Key="TestKey"
                 Value="WindowsFolder TestValue" />

      </Component>

2条回答
乱世女痞
2楼-- · 2020-04-05 02:09

Use Action="addLine" or Action="addTag" if you want to modify an existing value.

查看更多
再贱就再见
3楼-- · 2020-04-05 02:09

You could use the FileSearch element to set a property and then use this property in a condition.

查看更多
登录 后发表回答