Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Proxy Mode Installation Fails On Windows >= Vista
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
fvisagie
Posted: Jul 31 2012, 02:44 PM


Advanced Member


Group: Members
Posts: 35
Member No.: 26033
Joined: 19-August 09



Hi All,

Since Vista (it seems) Windows is using Windows Resource Protection (http://msdn.microsoft.com/en-us/library/aa382503.aspx) to protect certain files, folders and registry keys against modification.

The keys changed by proxyon.reg and proxyoff.reg are amongst these. When these changes are attempted, Registry Editor reports:
"Cannot import ...\proxyon.reg: Not all data was successfully written to the registry. Some keys are open by the system or other processes."

This despite elevated privileges etc.

It is possible to modify the registry key permissions to make modification of their contents possible. Briefly, the steps are:

    change key ownership from TrustedInstaller to the current user
    change permissions for the current user to Full Control
    make the key/value changes

Although I haven't authoratively verified it, apparently it's recommended to restore ownership to TrustedInstaller and user permissions to their previous settings afterwards. Supposedly this prevents TrustedInstaller from marking these registry keys as tampered during the next Windows Update etc. run and as a result taking unexpected or undesired actions. TrustedInstaller is identified by: "NT SERVICE\TrustedInstaller".

I can confirm that all these changes can be made manually (and that proxyon/off.reg work as expected afterwards). Apparently this can also be done programmatically as well as via SetACL-type scripts.

For all I know it might also be possible and perhaps desirable to install proxy mode in a totally different way that by-passes this problem. For now I just wanted to put this issue on the table for consideration for a future release.

Thanks,
Francois

PS. Perhaps the proxyon/off.reg problems at http://forums.virtualdub.org/index.php?act...6966&hl=proxyon were related.
 
     Top
phaeron
Posted: Aug 4 2012, 09:14 PM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



Hmm. The proxy mechanism has been a bit of a specialized and "at your own risk" mechanism for a while now, but it looks like Microsoft has now firmly labeled those keys as do-not-touch. With WRP in play there may even be rollback or patching risk involved. Changing the permissions would indeed allow this to install, but I don't see a good way to do this properly. The AVIFile/Extensions key is the only way to install AVIFile handlers, and while that key is still writable by regular installers to allow new extensions to be added, the critical AVI key is only writable by TrustedInstaller as you say.

The only way I could think of to do this without running afoul of the protection mechanisms would be to use a launcher that ran the target program with the AVIFile entry points hotpatched to force an override CLSID. That would theoretically work, but carries all of the classic problems of hotpatching including 32-bit/64-bit separation and program chaining. Not sure I'd want to ship that.
 
    Top
fvisagie
Posted: Aug 5 2012, 08:21 AM


Advanced Member


Group: Members
Posts: 35
Member No.: 26033
Joined: 19-August 09



QUOTE

    change key ownership from TrustedInstaller to the current user
    change permissions for the current user to Full Control
    make the key/value changes

An additional option to consider is continuing in the "at-your-own-risk" vein and including these steps for making the changes manually.
 
     Top
phaeron
Posted: Aug 11 2012, 08:09 PM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



OK, I'll go with that. Editing the readme is pretty low risk and effort. Thanks for looking into the details.
 
    Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
3 replies since Jul 31 2012, 02:44 PM Track this topic | Email this topic | Print this topic

<< Back to Testing / Bug Reports