I'm trying to implement the following self-update mechanism for my application: If an update is available, my application downloads the (WiX generated) MSI package and writes it to its AppData folder with an arbitrary name. The application then initiates the update process by calling
msiexec /fvomus "<ArbitraryName>.msi" /qn /L "<ArbitraryName>.msi.log" REINSTALL=ALL REINSTALLMODE=vomus
With this I get an error 1316 and the installation then terminates with error status 1603.
The original filename of the MSI is CCWirelessServer.msi
, but as I said before, my application writes the installer package with an arbitrary name, for example ba17b82d-0ab8-4fc9-aea8-62830042d49f.msi
. Now what I noticed is that Windows Installer is for some reason looking for a CCWirelessServer.msi
file and not for the correct temporary filename. You can see this in the log below.
Why is Windows Installer not using the filename I provided via command line? Is it a problem with my command line arguments or with the installer package?
Here is the log:
=== Logging started: 24.02.2014 09:16:30 ===
Action start 09:16:30: INSTALL.
Action start 09:16:30: FindRelatedProducts.
Action ended 09:16:30: FindRelatedProducts. Return value 0.
Action start 09:16:30: ValidateProductID.
Action ended 09:16:30: ValidateProductID. Return value 1.
Action start 09:16:30: CostInitialize.
Action ended 09:16:30: CostInitialize. Return value 1.
Action start 09:16:30: FileCost.
Action ended 09:16:30: FileCost. Return value 1.
Action start 09:16:30: CostFinalize.
Action ended 09:16:30: CostFinalize. Return value 1.
Action start 09:16:30: MigrateFeatureStates.
Action ended 09:16:30: MigrateFeatureStates. Return value 0.
Action start 09:16:30: InstallValidate.
Action ended 09:16:30: InstallValidate. Return value 1.
Action start 09:16:30: RemoveExistingProducts.
Action ended 09:16:30: RemoveExistingProducts. Return value 0.
Action start 09:16:30: InstallInitialize.
Action ended 09:16:30: InstallInitialize. Return value 1.
Action start 09:16:30: ProcessComponents.
Action ended 09:16:30: ProcessComponents. Return value 1.
Action start 09:16:30: UnpublishFeatures.
Action ended 09:16:30: UnpublishFeatures. Return value 1.
Action start 09:16:30: RemoveRegistryValues.
Action ended 09:16:30: RemoveRegistryValues. Return value 1.
Action start 09:16:30: RemoveShortcuts.
Action ended 09:16:30: RemoveShortcuts. Return value 1.
Action start 09:16:30: CAUninstallAsService.
Action ended 09:16:30: CAUninstallAsService. Return value 1.
Action start 09:16:30: RemoveFiles.
Action ended 09:16:30: RemoveFiles. Return value 1.
Action start 09:16:30: InstallFiles.
Action ended 09:16:30: InstallFiles. Return value 1.
Action start 09:16:30: CAInstallAsServiceRollback.
Action ended 09:16:30: CAInstallAsServiceRollback. Return value 1.
Action start 09:16:30: CAInstallAsService.
Action ended 09:16:30: CAInstallAsService. Return value 1.
Action start 09:16:30: CreateShortcuts.
Action ended 09:16:30: CreateShortcuts. Return value 1.
Action start 09:16:30: WriteRegistryValues.
Action ended 09:16:30: WriteRegistryValues. Return value 1.
Action start 09:16:30: RegisterUser.
Action ended 09:16:30: RegisterUser. Return value 0.
Action start 09:16:30: RegisterProduct.
MSI (s) (4C:50) [09:16:30:406]: Product: Wireless Server -- Error 1316. A network error occurred while attempting to read from the file: C:\ProgramData\MyCompanyName\Wireless Server\Updates\CCWirelessServer.msi
Error 1316. A network error occurred while attempting to read from the file: C:\ProgramData\MyCompanyName\Wireless Server\Updates\CCWirelessServer.msi
Action ended 09:16:30: RegisterProduct. Return value 3.
Action ended 09:16:30: INSTALL. Return value 3.
MSI (s) (4C:50) [09:16:30:419]: Windows Installer reconfigured the product. Product Name: Wireless Server. Product Version: 1.0.0.0. Product Language: 1033. Manufacturer: MyCompanyName. Reconfiguration success or error status: 1603.
=== Logging stopped: 24.02.2014 09:16:30 ===
Edit 1:
Just to verify that the problem is with the arbitrary filename I tried write the update package with the original filename of the installer, and it works!