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 version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="MyService"
type="win32"/>
<description>Description of your application</description>
<!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator"/>
</requestedPrivileges>
</security>
</trustInfo>
</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 version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="MyService"
type="win32"/>
<description>Description of your application</description>
<!-- Identify the application security requirements. -->
<v3:trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<v3:security>
<v3:requestedPrivileges>
<v3:requestedExecutionLevel level="requireAdministrator"/>
</v3:requestedPrivileges>
</v3:security>
</v3:trustInfo>
</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?