日期:2014-05-17  浏览次数:20979 次

Win7的上面不能注册我自己写的com组件,提示权限不够?
我自己在win7的一台机器上装了一个VC2012.建立一个ATL工程,加入简单对象并编译。
生成了com组件以后IDE提示:

1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(1615,5): warning MSB3073: The command ""c:\users\abc\documents\visual studio 2012\Projects\ATLProject1\Debug\ATLProject1.exe" /RegServer" exited with code -2147024891.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(1621,5): error MSB8011: Failed to register output. Please try enabling Per-user Redirection or register the component from a command prompt with elevated permissions.

我打开控制面板,发现我自己已经是Administrator权限了。为什么还是说不行呢? win7上还需要做什么设置吗?

------解决方案--------------------
在“命令行窗口”快捷方式上右键选择“以管理员身份运行”,在这窗口下运行注册命令试试