У меня есть приложение в Wpf / C #, и я создал установщик с помощью WiX Toolset. Установщик работает на всех протестированных компьютерах, он не отображает никаких сообщений об ошибках. Однако на некоторых компьютерах приложение не запускается после установки даже с правами администратора. Я верю, что это какая-то проблема с разрешением, но я не уверен. Как дать разрешения текущему пользователю?
UPDATE:
Пока что проблема возникла только на двух машинах с Windows 10 Home. Я подумал, что это может быть установщик версии, которую я установил.
Ниже приведены наиболее подходящие фрагменты кода.
Любая помощь очень приветствуется. Спасибо.
<Product Id="{2A173950-... }"
Codepage="UTF-8"
Name="Xyz"
Language="1033"
Version="1.0"
Manufacturer="Xyz Software"
UpgradeCode="{8B843496-... }">
<Package InstallerVersion="301"
Compressed="yes"
InstallScope="perMachine"
Manufacturer="Xyz Software"
Description="Xyz Installer"
Keywords="Practice,Installer,MSI"
Comments="(c) 2018, Xyz Software" />
<Feature Id="ProductFeature" Title="Xyz Installer" Level="1">
<ComponentGroupRef Id="ApplicationComponents" />
<ComponentGroupRef Id="DataComponents" />
<ComponentGroupRef Id="SavedFilesEmptyFolder" />
<ComponentGroupRef Id="StartMenuComponents" />
<ComponentGroupRef Id="DesktopComponents" />
</Feature>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<!--Program Files Folder-->
<Directory Id="ProgramFilesFolder">
<Directory Id="CompanyFolder" Name="Xyz Software" >
<Directory Id="ApplicationFolder" Name="Xyz" >
<Directory Id="DataFolder" Name="Data" >
<Directory Id="SavedFilesFolder" Name="Saved Files" />
</Directory>
</Directory>
</Directory>
</Directory>
<!--Start Menu-->
<Directory Id="ProgramMenuFolder">
<Directory Id="StartMenuFolder" Name="Xyz" />
</Directory>
<!--Desktop-->
<Directory Id="DesktopFolder" Name="Desktop" />
</Directory>
<Fragment>
<ComponentGroup Id="ApplicationComponents" Directory="ApplicationFolder">
<Component Id="CmpXyzExe" Guid="{1EA7372D-... }">
<File Id="FilXyzExe" Source="Xyz.exe" KeyPath="yes" />
</Component>
<Component Id="CmpSetPermissionsApp" Guid="{36CDCE9A-... }" >
<CreateFolder>
<util:PermissionEx User="Administrators" GenericAll="yes" />
<util:PermissionEx User="Users" GenericAll="yes" />
</CreateFolder>
</Component>
</ComponentGroup>
<ComponentGroup Id="DataComponents" Directory="DataFolder">
<Component Id="CmpXyzDic" Guid="{A32B6F47-... }">
<File Id="FilXyzDic" Source="Xyz.dic" />
</Component>
</ComponentGroup>
<Fragment>
<ComponentGroup Id="StartMenuComponents" Directory="StartMenuFolder">
<Component Id="CmpStartMenuShortcuts" Guid="{818AD65E-... }">
<CreateFolder />
<Shortcut Id="SctApplication"
Name="Xyz"
Target="[ApplicationFolder]Xyz.exe" />
<Shortcut Id="SctUninstall"
Name="Uninstall Xyz"
Description="Uninstalls Xyz and all of its components"
Target="[System64Folder]msiexec.exe"
Arguments="/x [ProductCode]" />
<RemoveFolder Id="RmvStartMenuComponents"
On="uninstall" />
<RegistryValue Root="HKCU"
Key="Software\Microsoft\Xyz"
Name="installed"
Type="integer"
Value="1"
KeyPath="yes" />
</Component>
</ComponentGroup>
<Fragment>
<ComponentGroup Id="DesktopComponents" Directory="DesktopFolder">
<Component Id="CmpDesktopShortcuts" Guid="{4FC34354-... }">
<Shortcut Id="SctApplicationDesktop"
Name="Xyz"
Target="[ApplicationFolder]Xyz.exe" />
<RemoveFolder Id="RmvDesktopComponents"
On="uninstall" />
<RegistryValue Root="HKCU"
Key="Software\Microsoft\Xyz"
Name="installed"
Type="integer"
Value="1"
KeyPath="yes" />
</Component>
</ComponentGroup>