0

Hi!

Would somebody answer my question, please? I need an user-friendly WIX uninstaller filename, how to achive it? It looks like windows set an artificial name which looks like a password :)

Thank you very much.

  • http://wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/create_uninstall_shortcut.html Is this documentation helpful? – Abigail Fox Jan 03 '18 at 14:43
  • I highly appreciate the answer, but it is not helpful. This is a bit different problem. The clue is that the applet for *Applicarions and Functions* before removal calls UAC, and the *UAC* shows an *unfriendly .msi filename*. The extension of the file is OK, but the name would be better. – Włodzimierz O. Kubera Jan 03 '18 at 15:16
  • 1
    There are several duplicates of this, https://stackoverflow.com/questions/4315840/the-uac-prompt-shows-a-temporary-random-program-name-for-msi-can-the-correct-na and https://stackoverflow.com/questions/6863137/odd-program-name-when-installing-signed-msi-installer and the answer is to use signtool with /d. – PhilDW Jan 03 '18 at 19:22
  • Thanks Phil, I took the liberty of incorporating these links into my answer below. This issue I had never heard of - strangely enough. – Stein Åsmul Jan 03 '18 at 20:05
  • I highly appreciate the support, @PhilDW . – Włodzimierz O. Kubera Jan 04 '18 at 10:39

1 Answers1

3

UPDATE: It appears signing the MSI with signtool.exe and the /d switch will change this behavior as explained in these answers (thanks to Phil for finding this):

Slipstreaming in a relevant link: Installshield Custom Dialogue Installer


The name you are seeing is probably the random hex name assigned to a copy of the original installation database that is cached on the system in %SystemRoot%\Installer (normally C:\WINDOWS\Installer). This is a "super hidden" OS folder, and it should never be touched in any way at all.

A sample path to such a database could be: C:\WINDOWS\Installer\7da655.msi. I am pretty sure this is what you are seeing in your UAC prompt. Please verify or better yet add a picture of it to your question for other people's reference.

This cached database, with the weird name, is used during modify, repair and uninstall operations for the software in question. What WiX is showing you is in every way the correct information - it is what a system administrator might even need to see at some point. However, other setup creation tools do things differently, often showing the vendor and the product GUID instead of the full path to the cached database.

So that was the explanation - now we have to wait for one of the WiX guys to actually answer whether it is possible to change this display type. As such this is more of a comment than an answer, but it should be relevant to understand what is going on. I am also going to have a look now to see if I see any options to change this in WiX.

In my personal opinon the WiX display is superior to some of the other UAC dialogs shown for other MSI files, but I realize you find this information too detailed for your users. I suppose they could hide this path in the "more information" section.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • I symlinked my C:\Windows\Installer folder to a separate drive because my SSD is so tiny :) – Brian Sutherland Jan 04 '18 at 16:09
  • I suppose - sounds a little risky? How about doing an admin install on your MSIs before installing instead? This should prevent them from being cached full size since the admin install modifies the Media table to use external source files (in a reliable, standard way). Then you can place the source files on a network share for all repair operations - which is what corporations do. [See some details here on issues with regards to signed MSI files & admin install](https://stackoverflow.com/questions/208530/why-does-msi-require-the-original-msi-file-to-proceed-with-an-uninstall/1189524#1189524). – Stein Åsmul Jan 04 '18 at 16:26
  • Just so it is clear: I know several people who use your link approach, and they say it works OK. However, you know what you are doing :-). I think it might be dangerous to rely on this linking for certain environments (unless the sysadmins are running the show, are up to speed on what it means to do this, don't have any issues with signing and test properly on the SOE). I would expect at least some sort of side-effect in a corporate setting - just the resident evil of all things :-). For your home machine it is probably fine. If worst comes to worst you can put the folder back as needed? – Stein Åsmul Jan 04 '18 at 16:31
  • Yeah I can just imagine everything that could go wrong with this in a corporate environment. Especially when the user looks at their sym linked folder wondering what the heck it is and deletes it and now we can't uninstall or upgrade anything on that machine. – Brian Sutherland Jan 04 '18 at 18:01
  • That, and perhaps there is a potential for injections into the MSI cache folder of dodgy MSIs if the new folder is not protected with the same ACLs as the original folder? I suppose such MSIs could launch elevated? Not sure how these symlinks you mention actually work. It just feels like one of those things where unexpected problems could show up. Those were just two issues. – Stein Åsmul Jan 04 '18 at 23:21
  • @Brian Sutherland I see this %SystemRoot%\Installer redirect quite often - and not everyone is successful like you have been. I tried to write up a list of alternatives, maybe you can check if you agree: https://stackoverflow.com/a/49347648/129130 (just self-evident stuff, but I may have omitted something or certain options are not good). – Stein Åsmul Mar 19 '18 at 16:10