为非管理员用户注册DLL(ActiveX) [英] Register DLL (ActiveX) for Non-Admin user

查看:241
本文介绍了为非管理员用户注册DLL(ActiveX)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用MSI为非管理员用户注册dll(ActiveX)。
要创建注册表设置,我已经以管理员模式注册了dll,然后导出相关的注册表项并将所有HKLM重命名为HKCU。

I try to register dll (ActiveX) for non-admin user using MSI. To create registry settings I have register the dll in admin mode, then exported the relevant registry entries and renamed all HKLM to HKCU.

当我安装它非管理员用户都可以正常工作。但是当我与管理员用户使用相同的设置时,会发现TypeLib的问题。

When I install it for non-admin user all works fine. But when I use the same settings with admin user, there is a problem of discovering TypeLib.

注册表项中应该更改哪些内容可用于管理员和非管理员,管理员用户,HKCU下的注册完成?

What should be changed in the registry entries to work both for admin and non-admin user, when the registration done under HKCU?

谢谢

推荐答案

p>如果您的参赛作品真的在香港会计师公会注册,将会奏效。你使用什么MSI安装程序?应该有一种方法来指定它应该以用户模式安装。

If your entries are really registered under HKCU, it will work. What MSI installer are you using? There should be a way to specify that it should install in user mode.

您是否让dll自行注册或将msi注册到dll?最好的做法是让MSI做到这一点,但更痛苦。如果你有.dll自我注册,你需要确保dll注册在HKEY_CURRENT_USER,而不是HKEY_LOCAL_MACHINE,ATL默认情况下。

Are you letting the dll self-register or having the msi register the dll? it is best practice to have the MSI do it, but it's more of a pain. If you're having the .dll self-register you need to make sure that the dll registers in HKEY_CURRENT_USER and not HKEY_LOCAL_MACHINE, which ATL does by default.

如果你建立它在VS2008与ATL,您将要添加:
AtlSetPerUserRegistration(true);
到您的DllRegisterServer和DllUnregisterServer。

If you built it in VS2008 with ATL, you'll want to add: AtlSetPerUserRegistration(true); to your DllRegisterServer and DllUnregisterServer.

无论如何,这些都是要寻找的东西。您可以使用进程监视器并观察Reg命令来查看正在发生的情况;某些地方写给HKLM。

Anyway, those are some things to look for. You can use Process Monitor and watch the Reg commands to see exactly what is happening; something somewhere is writing to HKLM.

这篇关于为非管理员用户注册DLL(ActiveX)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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