1

I am getting an odd return code from msiexec when installing an MSI. Namely, -2147021886. I THINK I remember reading somewhere that this is some sort of format or encoding issue, but I can't find the reference. I also found a microsoft page that talks about PS2.o having issues with negative return codes, but this is happening in PS5.0.

Stein Åsmul
  • 34,628
  • 23
  • 78
  • 140
Gordon
  • 4,559
  • 2
  • 22
  • 51
  • 1
    `-2147021886` is `0x80070BC2`, which according to [this page](http://inetexplorer.mvps.org/archive/windows_update_codes.htm) means `ErrorControlRebootRequired`. – Jonathon Reinhart Sep 29 '18 at 21:10
  • @Jonathon, where did you find that? My Google-Fu has only ever gotten me variations on this (https://docs.microsoft.com/en-us/windows/desktop/Msi/error-codes). Now I guess I need to try to figure out which ones I may encounter, because that is a monstrous list. – Gordon Sep 29 '18 at 22:02
  • Added a site that might help with things like these. – Stein Åsmul Sep 30 '18 at 01:49

1 Answers1

4

"The Magic Number Database": I recently discovered magnumdb.com (cleared virustotal 30-9-2018) in a tweet from Remko Weijnen. "The Magic Number Database" is apparently maintained by Simon Mourier.

Looking up your error code: https://www.magnumdb.com/search?q=-2147021886

1 ERROR_SUCCESS_REBOOT_REQUIRED Int32 -2147021886 %ProgramFiles(x86)%\Windows Kits\10\Include\10.0.17134.0\shared\winerror.h(11960,0)


Other Approaches: Including a couple of other options for similar situations.

  1. Visual Studio (2017): Menu choice: Tools => Error Lookup. This Visual Studio tool (errlook.exe) can be found in the "Tools" folder of your Visual Studio installation. N.B! Localized messages! (internationalized).

    errlook.exe

  2. cmd.exe: Via the command line, the net command can normally be used to look up error codes: net helpmsg errorcode. See blog link below for limitations.

  3. certutil.exe: Try it via cmd.exe: certutil.exe /error errorcode. Not sure if this is available in a clean install, but with Visual Studio it should be already available. Appears very good! Localized messages.

  4. Err.exe: An old tool from the Exchange team. Dated now. See blog link below - in the comments. Needs download. English messages, non-localized.

And in C++ the FormatMessage call. And just mentioning the winerror.h and ntstatus.h files. Retrieving the Last-Error Code. And a Powershell blog.


calc.exe: And obviously use the new Windows 10 calc.exe in "Programmer Mode" to convert between hex / dec and all kinds of other tasks:

calc.exe


Stein Åsmul
  • 34,628
  • 23
  • 78
  • 140