Click here to Skip to main content
15,887,340 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
I have a windows service which is written in C++ using VS2005. I also use the VS2005 to create the installer. The installer is working fine with Win XP but I run into UAC(User Account Control) Windows 7. My windows service does not register into Services database. In my installer, there are action to callback the "MyService -i" for install and "MyService -u" for uninstall.

If I right click on the installer and choose "Troubleshoot compatibility", my windows service will install successful. However, this is only a workaround.

I have tried to add manifest to the windows service

XML
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestversion="1.0">
  <assemblyidentity version="1.0.0.0">
     processorArchitecture="X86"
     name="MyService"
     type="win32"/&gt;
  <description>Description of your application</description>
  &lt;!-- Identify the application security requirements. --&gt;
  <trustinfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedprivileges>
        <requestedexecutionlevel level="requireAdministrator" />
        </requestedprivileges>
      </security>
  </trustinfo>
</assemblyidentity></assembly>


After rebuild my service and installer, I get "There is a problem with Windows Installer package. A program required for this install to complete could not be run. Contract your support or package vender" message.
I also tried
XML
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestversion="1.0">
  <assemblyidentity version="1.0.0.0">
     processorArchitecture="X86"
     name="MyService"
     type="win32"/&gt;
  <description>Description of your application</description>
  &lt;!-- Identify the application security requirements. --&gt;
  <v3:trustinfo xmlns="urn:schemas-microsoft-com:asm.v3" xmlns:v3="#unknown">
    <v3:security>
      <v3:requestedprivileges>
        <v3:requestedexecutionlevel level="requireAdministrator" />
        </v3:requestedprivileges>
      </v3:security>
  </v3:trustinfo>
</assemblyidentity></assembly>


The VS2005 response with "general error c1010070: Failed to load and parse the manifest." The installer is not sucessfully build.

I have tried to add "setup" or "update" as the keyword in the installer and tried to change the suffix of the installer to include "setup" or "update" but UAC is still blocking the registration of my service.

Is there anything I miss?
Posted
Updated 22-Oct-10 10:39am
v2

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900