Cannot uninstall the package #7933
-
I kind of hit the wall while investigating "This installation package could not be opened. Verify that the package exists and that you can access it or contact the application vendor to verify that this is a valid Windows Installer package." The structure of my project is straightforward:
Package.wixproj <Project Sdk="WixToolset.Sdk/4.0.3">
<PropertyGroup>
<OutputPath>bin\$(Configuration)</OutputPath>
<HarvestDirectoryVerboseOutput>true</HarvestDirectoryVerboseOutput>
</PropertyGroup>
<ItemGroup>
<HarvestDirectory Include="..\..\Service\bin\$(Configuration)\$(Platform)\publish">
<ComponentGroupName>HarvestedComponents</ComponentGroupName>
<DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
<SuppressCom>true</SuppressCom>
<SuppressRegistry>true</SuppressRegistry>
<SuppressRootDirectory>true</SuppressRootDirectory>
<Transforms>Transform.xslt</Transforms>
</HarvestDirectory>
<BindPath Include="..\..\Service\bin\$(Configuration)\$(Platform)\publish" />
</ItemGroup>
<ItemGroup>
<None Include="Transform.xslt" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="WixToolset.Heat" Version="4.0.3" />
</ItemGroup>
</Project> Package.wsx <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
<Package Name="Service"
Manufacturer="COMPANY"
Version="1.0.0.0"
UpgradeCode="8DCEA6F1-D6BA-4BBE-A288-373CE58D90A1"
Scope="perMachine">
<MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
<Feature Id="Main">
<ComponentGroupRef Id="MainComponents" />
</Feature>
<ComponentGroup Id="MainComponents" Directory="INSTALLFOLDER">
<ComponentGroupRef Id="HarvestedComponents" />
<ComponentRef Id="Service" />
</ComponentGroup>
<StandardDirectory Id="ProgramFiles64Folder">
<Directory Id="INSTALLFOLDER"
Name="Service"
FileSource="..\..\Service\bin\$(var.Configuration)\$(var.Platform)\publish">
<Component Id="Service" Guid="CACED914-B858-439D-AB05-49D0CFFF6C84">
<File Name="Service.exe" />
<ServiceInstall Id="ServiceInstaller"
Type="ownProcess"
Name="Service"
DisplayName="Service"
Description="Service"
Start="auto"
ErrorControl="normal" />
<ServiceControl Id="StartService"
Start="install"
Stop="both"
Remove="uninstall"
Name="Service"
Wait="yes" />
</Component>
</Directory>
</StandardDirectory>
</Package>
</Wix> Transform.xslt <?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
xmlns:wix="http://wixtoolset.org/schemas/v4/wxs">
<xsl:output method="xml" indent="yes"/>
<xsl:variable name="exeCompId" select="/wix:Wix/wix:Fragment/wix:DirectoryRef/wix:Component[wix:File[@Source='SourceDir\Service.exe']]/@Id" />
<xsl:template match="/wix:Wix/wix:Fragment/wix:DirectoryRef/wix:Component">
<xsl:choose>
<xsl:when test="@Id = $exeCompId" />
<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="/wix:Wix/wix:Fragment/wix:ComponentGroup[@Id='HarvestedComponents']/wix:ComponentRef">
<xsl:choose>
<xsl:when test="@Id = $exeCompId" />
<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet> these files create installer successfuly and it installs the app and service. However, when I try to uninstall: msiexec /x Service.msi /l*v log.txt it fails with error:
The logs are not very helpful: MSI (s) (BC:04) [17:31:35:647]: MSI_LUA: Credential prompt is not required at this point, product is managed and deployment compliant
MSI (s) (BC:04) [17:31:35:647]: Note: 1: 2205 2: 3: MsiPackageCertificate
MSI (s) (BC:04) [17:31:35:648]: Note: 1: 2205 2: 3: MsiDigitalCertificate
MSI (s) (BC:04) [17:31:35:648]: PROPERTY CHANGE: Adding ProductState property. Its value is '5'.
MSI (s) (BC:04) [17:31:35:648]: PROPERTY CHANGE: Adding ProductToBeRegistered property. Its value is '1'.
MSI (s) (BC:04) [17:31:35:648]: Note: 1: 1324 2: . 3: 1
MSI (s) (BC:04) [17:31:35:648]: Note: 1: 1324 2: . 3: 1
The folder path '.' contains an invalid character.
MSI (s) (BC:04) [17:31:35:648]: Note: 1: 1729
MSI (s) (BC:04) [17:31:35:648]: Product: Service -- Configuration failed.
MSI (s) (BC:04) [17:31:35:648]: Windows Installer reconfigured the product. Product Name: Service. Product Version: 1.0.0.0. Product Language: 1033. Manufacturer: COMPANY. Reconfiguration success or error status: 1619.
MSI (s) (BC:04) [17:31:35:649]: MainEngineThread is returning 1619
MSI (s) (BC:AC) [17:31:35:649]: No System Restore sequence number for this installation.
This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.
C:\Users\User\Project\src\Service\Build\.\Service.Package\bin\Release\en-US\Service.Package.msi
MSI (s) (BC:AC) [17:31:35:649]: User policy value 'DisableRollback' is 0
MSI (s) (BC:AC) [17:31:35:649]: Machine policy value 'DisableRollback' is 0
MSI (s) (BC:AC) [17:31:35:649]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (BC:AC) [17:31:35:649]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (BC:AC) [17:31:35:650]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (BC:AC) [17:31:35:650]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (B0:08) [17:31:35:651]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (B0:08) [17:31:35:651]: MainEngineThread is returning 1619
=== Verbose logging stopped: 20/12/2023 17:31:35 === I've tried to use orca, but it could not find any errors in the package. The only suspicious thing I've found is that the log has "The folder path '.' contains an invalid character." message, but I have no idea where it comes from. Any suggestions will be appreciated. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is ridiculous, but
works, while
does not... This can be closed. |
Beta Was this translation helpful? Give feedback.
This is ridiculous, but
works, while
does not... This can be closed.