Wixtoolset - 安装后会出现锁定

问题描述 投票:0回答:1

我使用wixtoolset创建了一个msi,并使用下面的代码向所有用户授予安装文件的权限。问题是安装后,屏幕上的所有文件都会显示锁定。我仍然有权访问它们但我想避免锁定的事情。

我的Wix版本是3.5

我知道问题在于我给的权限,因为当我从instakker中删除它们时,锁不会出现。

<DirectoryRef Id="INSTALLFOLDERSERVICE">
  <!--  SERVICE FILES   -->
  <!-- Create a single component which is the TestService.exe file -->
  <Component Id="SERVICE" GUID="*">

    <!-- Remove all files from the INSTALLFOLDER on uninstall -->
    <RemoveFile Id="ALLFILES" Name="*.*" On="both" />

    <!-- Tell WiX to install the Service -->
    <ServiceInstall Id="ServiceInstaller"
        Type="ownProcess"
        Name="SERVICEtoINSTALL"
        DisplayName="$(var.Name)"
        Description=""
        Start="auto"
        ErrorControl="normal" />

    <!-- Tell WiX to start the Service -->

    <ServiceControl Id="StartService" Start="install" Stop="both" Remove="uninstall" Name="SERVICEtoINSTALL" Wait="yes" />

    <CreateFolder>
      <Permission User="Everyone" GenericAll="yes" />
    </CreateFolder>

  </Component>

代码编译完美。我需要该权限来管理来自其他应用程序的文件,但我想避免锁定的事情。你可以在这里看到它;

https://drive.google.com/open?id=1Z6zYEt444DjOXe2ODP60q2X00Xpq5bkZ

谢谢!!

wix wix3.5 wix3 wix3.7 wix3.6
1个回答
0
投票

我找到了解决方案!问题是我在桌面上给快捷方式文件夹的权限,删除该权限标签解决了我的问题!

© www.soinside.com 2019 - 2024. All rights reserved.