"This program might not have installed correctly" message in Windows 7 RC
Asked Answered
I

3

29

I have an installer that works perfectly under NT 5.x, Vista, and Windows 7. It contains the proper manifest for UAC on NT 6.x.

But starting with Windows 7 RC, every time the setup program closes, Windows produces an erroneous "This program might not have installed correctly" message, even though the program did install correctly with no problems whatsoever. I never got these spurious messages in Vista or in Windows 7 beta.

I sent a bug report to Microsoft, but have not heard back. I thought that this might just be a glitch in the Windows 7 RC, but the problem is still there on a fresh install of one of the very recent RTM-escrow builds that was leaked. Microsoft has no documentation whatsoever about this--not even a hint to what might possibly be triggering it.

Even more frustrating is that I get this "This program might not have installed correctly" message even if I cancel the install on the very first are-you-sure-you-want-to-proceed screen before any of the installation code (creating a temp dir, extracting files, copying, registry, etc.) is ever run.

Has anyone figured this one out?

Ixtle answered 1/7, 2009 at 13:25 Comment(3)
Does this below on ServerFault?Norry
Legit programmer's question IMO. If I were to create an installer, I'd like it to pass Windows 7's proper installation criteria.Cleareyed
Sorry, I should've clarified: when I said, "I have an installer", I meant "I created an installer using C", which is why this is in Stack Overflow and not Server Fault.Ixtle
I
29

Well, to answer my own question, I've found a way to solve this problem. I noticed that the WinRAR changelog indicated that WinRAR's self-extractor also suffered from the same problem, and that it was solved. So I downloaded the latest version of WinRAR and threw it into a disassembler, along with an earlier version, looking for any new API calls, etc. Long story short, it turns out that all that it did was add the following to the manifest:

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
  <application>
    <!--The ID below indicates application support for Windows Vista -->
      <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
    <!--The ID below indicates application support for Windows 7 -->
      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
  </application>
</compatibility>

Some Googling of the strings turned up some documentation: apparently, this is something new that was added to Windows 7 and that the documentation for it was created on May 20. It didn't help that Microsoft doesn't link to this from any of their Win7 documentation pages, much less feature it prominently. sigh

Edit: This is documented, poorly, on MSDN here.

Ixtle answered 1/7, 2009 at 13:59 Comment(2)
This doesn't actually solve the underlying problem. You're just telling Windows not to report it anymore. msdn.microsoft.com/en-us/library/dd371711(VS.85).aspx ; Windows 7: Applications with Compatibility section will not get the PCA mitigation. Admittedly, it might be the path to go in some cases.Foxed
Well, it's not entirely clear that Windows is reporting this correctly. The installer works as designed with the PCA disabled, and, as I noted in my other comment, I had long ago waded through the app verifier logs and even looked up various API calls to make sure that were wasn't so new Win7 caveat that I had missed. I had stripped the installer down so much that it wasn't even doing anything, and Windows still complained. So I'm pretty sure that this is the right course of action.Ixtle
I
3

I ran into the same error message when running a new Qt based app I built. Same symptoms - would get this 'helpful' message after the .exe closed, no matter what the program did.

Now I have various qt app projects, all built the exactly the same way. And none of the others do this.

I finally figured out that this error was caused solely by the fact that I had named this particular project 'installer'. I had ended up with a binary 'installer.exe' and it would have no doubt had the project name built into it elsewhere (without delving into the qmake generated project file, not exactly sure what).

The point of interest is that you can run into this problem simply by having a project called 'installer' and nothing else.

Idolater answered 30/3, 2014 at 14:23 Comment(0)
F
1

Have you thrown the Application Compatibility Toolkit at your installer?

I've never had cause to deal with it before, but this seems like exactly what its intended for.

Foxed answered 1/7, 2009 at 13:46 Comment(1)
Yes, I had tried that. Sifted through every entry in the log that was generated and could not find any helpful bits of information.Ixtle

© 2022 - 2024 — McMap. All rights reserved.