UAC(用户帐户控制)阻止我在win7上安装Windows服务 [英] UAC(user account control) block installation of my windows service on win7

查看:112
本文介绍了UAC(用户帐户控制)阻止我在win7上安装Windows服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Windows服务,该服务是使用VS2005用C ++编写的.我还使用VS2005创建安装程序.该安装程序在Win XP上运行正常,但是我遇到了UAC(用户帐户控制)Windows7.我的Windows服务未注册到Services数据库中.在我的安装程序中,有用于回调"MyService -i"进行安装和"MyService -u"进行卸载的操作.

如果右键单击安装程序,然后选择兼容性故障排除",则Windows服务将成功安装.但是,这只是一种解决方法.

我试图将清单添加到Windows服务

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

<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>



重建我的服务和安装程序后,出现"Windows Installer软件包存在问题.无法运行完成此安装所需的程序.与您的支持或软件包供应商签约"消息.
我也尝试过



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

<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>



带有一般错误c1010070:无法加载和解析清单"的VS2005响应.安装程序未成功构建.

我试图在安装程序中添加"setup"或"update"作为关键字,并尝试将安装程序的后缀更改为包括"setup"或"update",但UAC仍阻止我的服务注册. >
我想念什么吗?



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?

推荐答案

您需要添加安装程序类才能正确安装服务.查看链接以获取有关此的更多信息.

http://msdn.microsoft.com/zh-我们/library/system.configuration.install.installer%28VS.80%29.aspx [ http://stackoverflow.com/questions/1190294/c-windows-service-installer -not-registering- [ ^ ]

http://support.microsoft.com/kb/816169 [ http://msdn.microsoft.com/en-us/library/zt39148a% 28VS.80%29.aspx [ ^ ]

祝你好运!
You would need to add an installer class to install the service correctly. Look at the links for more info on this.

http://msdn.microsoft.com/en-us/library/system.configuration.install.installer%28VS.80%29.aspx[^]

http://stackoverflow.com/questions/1190294/c-windows-service-installer-not-registering-[^]

http://support.microsoft.com/kb/816169[^]

http://msdn.microsoft.com/en-us/library/zt39148a%28VS.80%29.aspx[^]

Good luck!


这篇关于UAC(用户帐户控制)阻止我在win7上安装Windows服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆