How to get elevated permission to edit a registry CLSID, with in a WiX fragment

时光毁灭记忆、已成空白 提交于 2019-12-08 02:14:56

问题


I am trying to set windows desktop search to use a different html filter other than the system default filter(nlhtml.dll). When I look up the PersistentHandler (HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.html\PersistentHandler) it points to HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{eec97550-47a9-11cf-b952-00aa0051fe20}.

I want to change the value of above clsid. Following is the WiX snippet

<?define PersistentHandler_HtmlIFilter="eec97550-47a9-11cf-b952-00aa0051fe20"?>

<RegistryValue Action="write" Root="HKLM" Key="SOFTWARE\Classes\CLSID\{$(var.PersistentHandler_HtmlIFilter)}" Value="MY HTML Persistent Handler" Type="string" />

But the value is not changed.

Regarding permission; Only TrustedInstaller has full control of this entry. Administrator, SYSTEM and other users only have read permission.

How can I get elevated permission to make this registry change using WiX. This is part of a larger project and I am only editing a fragment of WiX script (<Fragment>.. </Fragment>).

Thank you.


回答1:


You cannot. Registry keys limited to TrustedInstaller indicate keys that are protected by Windows Resource Protection. Windows Installer will not modify these keys.




回答2:


Try PC Hunter or Power Run, and run regedit with it, and run it with system privileges, and you can do what you like.



来源:https://stackoverflow.com/questions/9465652/how-to-get-elevated-permission-to-edit-a-registry-clsid-with-in-a-wix-fragment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!