Windows > Software Development for Windows Client Forums > Application Compatibility for Windows Development > Windows 7 Program Compatibility Assistant and VS2008 Clickonce deployment
Ask a questionAsk a question
 

AnswerWindows 7 Program Compatibility Assistant and VS2008 Clickonce deployment

  • Thursday, October 29, 2009 11:11 PMtrinode Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    Everytime I try and deploy my clickonce solution (to a folder) it makes a setup.exe a *.application and such...
    however setup.exe triggers PCA alerts in windows 7, my visual studio is 2008 is SP1 patched, is there some other update that will make a "compatible" setup.exe? (my end users like to click setup.exe files over the myapp.application files, plus I'd like to have one procedure to follow for xp and vista and 7, and some of them didn't even have the framework installed, so the setup.exe was handy to install it automatically..)
    My application has the correct manifest to identify as 7 compatible, is there an update I can use for the clickonce setup.exe?

Answers

  • Tuesday, November 03, 2009 5:59 AMRong-Chun ZhangMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hello Anthony,

    Thanks for your feedback.

    Based on my test, you could add the manifest to setup.bin in "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Engine" folder.

    You can first change setup.bin to setup.exe, and add the compatibility element to the manifest, then rename it back to setup.bin.

        mt.exe -inputresource:setup.exe;#1 -manifest additional.manifest -outputresource:mysetup.exe;#1

    Thanks,
    Rong-Chun Zhang


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

All Replies

  • Friday, October 30, 2009 9:26 AMRong-Chun ZhangMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello,

    Program Compatibility Assistant will monitor the Programs and Features control panel (previously known as Add/Remove Programs), when an installer is run.  If an entry is not created or removed from the Programs and Features control panel, the PCA treats the process as a failed setup and displays a dialog after the setup process exits that asks if the user wants to attempt to re-install using recommended settings.

    When you run the setup.exe for ClickOnce application, Windows 7 treat it as an installer(UAC), however this bootstrapper doesn't actually installed an application and does not leave an item in Programs and Features control panel, thus the Program Compatibility Assistant dialog shows.

    To workaround this, we can try to run the .application file directly.

    Thanks,
    Rong-Chun Zhang 

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • Sunday, November 01, 2009 2:44 PMtrinode Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    thanks for the response, I was hoping the answer was going to be "just install the windows 7 sdk" :(

    I'm aware of the cause of the issue. But I know if I'm making an exe called setup.exe I can disable this problem by setting "asInvoker" in the manifest file. But since clickonce doesn't require admin permissions (the whole point of clickonce is for per user installs), then it should also have this option in it's manifest to stop PCA from expecting an add / remove entry. I may well just end up editing the manifest myself, but could you tell me where the setup.exe file is copied *from* when you perform a clickonce deployment?

    Thanks,

    - Anthony

  • Monday, November 02, 2009 12:17 AMtrinode Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code

    I seem to need to extract the manifest and add the following then reinsert it (using mt.exe)... is there somewhere I can change the default setup.exe to include this?

     

     

      <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
        <application>
          <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
          <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
        </application>
      </compatibility>

     


  • Tuesday, November 03, 2009 5:59 AMRong-Chun ZhangMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hello Anthony,

    Thanks for your feedback.

    Based on my test, you could add the manifest to setup.bin in "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Engine" folder.

    You can first change setup.bin to setup.exe, and add the compatibility element to the manifest, then rename it back to setup.bin.

        mt.exe -inputresource:setup.exe;#1 -manifest additional.manifest -outputresource:mysetup.exe;#1

    Thanks,
    Rong-Chun Zhang


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • Tuesday, November 24, 2009 7:56 PMKeith Dorken Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello,

    Program Compatibility Assistant will monitor the Programs and Features control panel (previously known as Add/Remove Programs), when an installer is run.  If an entry is not created or removed from the Programs and Features control panel, the PCA treats the process as a failed setup and displays a dialog after the setup process exits that asks if the user wants to attempt to re-install using recommended settings.

    When you run the setup.exe for ClickOnce application, Windows 7 treat it as an installer(UAC), however this bootstrapper doesn't actually installed an application and does not leave an item in Programs and Features control panel, thus the Program Compatibility Assistant dialog shows.

    To workaround this, we can try to run the .application file directly.

    Thanks,
    Rong-Chun Zhang 

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

    Are you indicating that this is a problem in Windows 7 for all setup.exe bootstrapper programs for clickonce (even if they do have the correct manifest installed in them). I just added information to another message thread documenting my observations (see the other thread in this forum with subject

    ClickOnce, Windows 7 and the Program Compatibility Assistant

    http://social.msdn.microsoft.com/Forums/en/winformssetup/thread/7787c8b9-18c3-4135-bd8a-2802eba98e3c)

    and concluded that there is something not working properly in Windows 7 explorer's interpretation of the manifest in the setup.exe file. What I read here is that regardless of the manifest being in the file, Windows 7 treats ALL setup.exe programs that do not 'install' anything (i.e. all bootstrappers) as needing PCA assistance.
    I think I see that I need to add the compatability manifests to Windows 7 to our setup.exe manifest resource