Im trying to get ownership of the uxtheme.dll in my windows 8.1 system32 folder programatically (c++). I read, tried and googled for several hours now but cant find any solution. Every time the uxtheme ownership is set, it doesnt show up in the properties tab. Ownership and full rights are always inherited by the Trusted Installer.

I tried it with system("takeown /f C:\Windows\system32\uxtheme.dll") which prints out success but sadly is not working.

Same goes for the function TakeOwnership() from msdn. [http://msdn.microsoft.com/en-us/library/windows/desktop/aa379620%28v=vs.85%29.aspx]

What do i need to do, to inherit ownership for the local admin, so i can switch out this dll? Does resource protection have anything to do with it?

Once the ownership is set will i be able to replace the dll with MoveFileEx()?

thank you very much, lody

没有正确的解决方案

其他提示

Ok i solved my problem.

Take ownership of all directorys the file is in. Be aware: If youre running 64bit, pathes to system\ files will be redirected to SysWoW64\ folder.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top