Windows msi: error 1316: the specified account already exists
Asked Answered
L

7

9

The execution of a wix package from a bundle outputs "error 1316: The specified account already exists" during upgrade. How can a windows installer output this error code? I'm afraid there isn't much documentation about it.

We previously released a product consisting of a single msi package, and now we are preparing an upgrade which consists of a wix bundle containing a new version of this msi package. The product code and filename between the original msi package and the update haven't changed.

Edit: The msi package for now doesn't support upgrade. When the user needs to upgrade (whenever it's a major upgrade, minor upgrade or small update), he must first manually uninstall the previous package...

Edit 2: I just removed the references to util extension for compilation and the installer seems to work fine... I still need to fully test it though.

Lambard answered 22/6, 2015 at 8:37 Comment(0)
S
10

Like MrFusion, I ran into this problem with the uninstall/install of another program. Unfortunately, the link in that answer is no longer valid, and redirects to a page that lists many easy fix solutions, except for the only one that will help. That one, "Program Install and Uninstall", is currently available at: https://support.microsoft.com/en-us/help/17588/fix-problems-that-block-programs-from-being-installed-or-removed

It solved the problem for me.

Scrivner answered 4/8, 2018 at 19:1 Comment(1)
This helped me with the infamous problem: rog.asus.com/forum/…Tequila
M
4

I had his same issue and since win10 doesn't allow you to run the fixit tool from the web, I did the following hack to uninstall Asus Smart Gesture on my Windows 10 laptop.

  1. You need to fake the MS site into thinking your pc isn't Win10. I installed a Chrome add-in that allowed me to change the user-agent of the chrome browser to thinking I was IE9 and previous version of windows: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)

  2. This allows you to see the fixit button and to download a portable version of the tool (in case you need to use it on non-networked clients)

  3. I downloaded and extracted to my downloads library in a folder called fixitp.

  4. If I run the exe directly, I get some nasty script error. What I did to get around that was to navigate to the Resources folder and then to the Troubleshooters folder.

  5. I ran the Program_Install_and_Uninstall.diagcab which run and allowed me to uninstall successfully the Asus SmartGesture program.

  6. I then installed a fresh version of ASUS's Smart Gesture from their site.

I suspect that any installed app that you can't uninstall can be resolved by this same process - just haven't run into any other that this on.

Good luck.

Mckenney answered 13/12, 2015 at 16:59 Comment(0)
H
2

An upgrade MSI requires the MSI to have a new ProductCode, an incremented ProductVersion (in the first 3 fields) and the same UpgradeCode. So it's not clear to me that you're actually getting an upgrade, depending on what the Burn part thinks you are doing. It can't do an upgrade because you have the same ProductCode. (You need a MajorUpgrade element in your MSI to do a proper upgrade). So there is some doubt as to whether you're getting an actual full upgrade. If your intent is to replace the installed MSI with a full upgrade, and a higher versioned product then use MajorUpgrade.

So Burn may have decided to do an in-place update by reinstalling the MSI file (and that's more like a patch than an update), and that's relevant because you don't say whether you have any custom actions or WiX util functions (they are still custom actions) that create a user account. If you do, then the most likely reason for your error is that Burn reinstalled your new MSI as an update by reinstalling the MSI file, and some custom action simply ran again, and yes, that user is still there because there has not been an actual uninstall that would delete it. Or the ProductVersion of your MSI is the same and you got a maintenance mode repair, so a custom action would run again.

I'd get a verbose log of the upgrade to see exactly what's going on.

There's a lot of guesswork here because you say you want an upgrade but your MSI isn't built to actually do an upgrade, and you don't say if you have WiX util User in there to create a user account. You also don't say if you have incremented the ProductVersion of your new MSI either, so again that results in more guesswork as to what Burn might do. The verbose log would show whether it's a custom action issue or something else, what kind of update (if any) that you're doing.

Hema answered 22/6, 2015 at 18:12 Comment(3)
Cf my edit. Furthermore, is there a built-in functionality in the wix bundle to first uninstall a package? We can edit the msi package in order to support upgrade, but it would require us a lot of work...Lambard
In addition I still don't understand how can the error "error 1316: The specified account already exists" appear. I'll be grateful for any explanationLambard
As far as I can tell, and as I said, you don't actually have an installer upgrade because you require the user to uninstall the older version (why?). You have a fresh install that assumes the user has uninstalled the older version, as far as I can tell. If you install the same MSI with the same ProductCode as is already installed then you get a maintenance mode, basically a repair, and that basically goes through a reinstall. so the custom action util runs again and can't create a user that already exists. Again, guessing without all the info about codes/versions etc.Hema
R
1

I ran into this recently. For me this worked for me by keeping the names of both the older version and the newer version of the installer same. No idea why it works, but some of the best practices while working with msi is to keep the name of the installers same.

A couple of links to support the case –

  1. http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/KB2918614-td7596942.html

  2. https://community.flexerasoftware.com/showthread.php?189045-Upgrade-failed-with-Error-1316&highlight=error+1316+account+already+exists

Racy answered 1/9, 2015 at 10:49 Comment(0)
D
1

I had the same issue uninstalling another program. This Fix-It solved the problem for me: https://support.microsoft.com/en-us/mats/program_install_and_uninstall/en

Update note: it's no longer necessary to emulate an older user-agent on Windows 10 to download the fix-it file.

Update 2: As Chris Johnson mentioned, Microsoft has discontinued Easy Fix, so the link above does not work anymore.

Dagley answered 3/11, 2015 at 9:38 Comment(0)
M
1

You probably need to change the 'packagecode' (note: NOT 'ProductCode') for the MSI. You'll find it in the Summary Information Stream.

Just encountered this myself when trying to create an Upgrade MSI package. Using Orca to change the 'packagecode' fixed it.

Musil answered 23/4, 2020 at 10:48 Comment(0)
C
0

For me, that happening with nodejs when I was trying to uninstall it. What solved in my case was downloading the same version of nodejs that was installed (8.11.1) and uninstalling that from msi installer file.

Cristycriswell answered 3/8, 2020 at 20:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.