Welcome to MSDN Blogs Sign in | Join | Help

SYSK 277: How-To Bring Back the TrustedInstaller

Are you getting ‘Unable to save permission changes on file_name.  Access is denied.’ error messages trying to modify a file or change permissions on a file that has TrustedInstaller as its owner? 

 

I’ve seen suggestions on the Internet recommending taking ownership on that file…  Often, these types of suggestions are followed by a comment like this one: “Once you change the owner of the file, you can’t change it back! This is because the TrustedIstaller group doesn’t exist as a normal group.”

 

Well, this is simply not correct!  I’ll explain in a moment how to restore ownership to TrustedInstaller, but first, a word about the TrustedInstaller itself…

 

There are a few so called “essential” resources (system files, folders, and registry keys) that are installed as part of Windows Vista. To prevent application and operating system failure, these resources are protected using Windows File Protection (WFP) in such way that applications or users don’t modify these resources.   The way this protection is implemented is by setting an ACL on these resources only to allow the TrustedInstaller user to modify them. Not only Administrator (elevated or not) cannot modify them, but neither can the System…

 

Beware, that setup applications trying to modify a protected system resource will not get an error above -- the OS will detect that it’s an installation program, the request will be accepted and success code returned, but the resource will actually not be modified!

 

For the record: I strongly suggest you don’t mess with the protected system resources! 

 

Having said that, if you have moved the ownership to yourself so you could give yourself permissions to modify the resource, and now want to reset it back to TrustedInstaller as the owner, simply follow these steps:

  • Right mouse button click on the file and choose Properties
  • Click Security tab
  • Click Advanced button
  • Click Owner tab
  • Click Edit button
  • Click Other User or Group and type in NT SERVICE\TrustedInstaller
  • Press Ok on all dialogs until all property dialogs are closed

 

 

Published Tuesday, January 30, 2007 5:28 AM by irenak

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: SYSK 277: How-To Bring Back the TrustedInstaller

Thursday, April 12, 2007 3:20 AM by Reki

How to add "NT SERVICE\TrustedInstaller" for some folder by calling win api, e.g AllocateAndInitializeSid and SetNamedSecurityInfo?

# re: Reply to Reki

Thursday, April 12, 2007 8:13 AM by irenak

Using Windows Explorer, right mouse click on folder or file, choose Properties context menu item, then click on Security tab...

# re: SYSK 277: How-To Bring Back the TrustedInstaller

Monday, May 14, 2007 7:21 PM by SHawn

WHat if the installer is a remote source? How do I enable it to modify, say, a .dll file?

# re: SYSK 277: How-To Bring Back the TrustedInstaller

Friday, July 20, 2007 1:45 PM by David Colonia

In your procedure needs to add "Restart"

# re: SYSK 277: How-To Bring Back the TrustedInstaller

Tuesday, August 28, 2007 6:34 PM by Kevin Daly

Is TrustedInstaller using TrustedInstaller.exe as a wrapper or shell? I'm debugging the following event from Windows Update Vista 64.

Faulting application TrustedInstaller.exe, version 6.0.6000.16386, time stamp 0x4549b6e9, faulting module wcp.dll, version 6.0.6000.16386, time stamp 0x4549d331, exception code 0x80000003, fault offset 0x0000000000187d75, process id 0xb14, application start time 0x01c7e76866e06be8.

# re: SYSK 277: How-To Bring Back the TrustedInstaller

Tuesday, December 04, 2007 5:35 AM by William

I had problem with the command

NT SERVICE\TrustedInstaller on my Vista so wrote it like this instead.

NT Service\TrustedInstaller

After that it found it.

# re: SYSK 277: How-To Bring Back the TrustedInstaller

Friday, January 11, 2008 3:30 PM by Good Point

In your post you write "The way this protection is implemented is by setting an ACL on these resources only to allow the TrustedInstaller user to modify them."

In my experience, an application with backup/restore privileges can modify files regardless of their ACL/DACL.  But these files can't be modified unless the owner of the file is changed to something other than TrustedInstaller.  How is this protection accomplished by WFP?

# re: SYSK 277: How-To Bring Back the TrustedInstaller

Monday, October 06, 2008 11:59 PM by Ratael

thank you a lot I modified some files and I wanted all back exactly as it was before, thank you!!!

# re: SYSK 277: How-To Bring Back the TrustedInstaller

Tuesday, December 23, 2008 11:11 PM by Vista User

hi, i'm managing to repair my rundll32.exe at the system32 folder in the windows folder, i tried to add the TrustedInstaller permission, because it haven't but, when i add the permission and press ok or apply, it says "Unable to save permission change on rundll32, access is denied" but, i activate the DISABLE UAC feature and reboot my computer (restart). please give me an idea, i want to install microsoft C++ 2005, to play warcraft 3:frozen throne version 1.22a and play at the battle.net, but i can't install the C++ because of it.

# re: SYSK 277: How-To Bring Back the TrustedInstaller

Thursday, April 02, 2009 3:05 PM by Zephan

Anyone know how to get TrustedInstaller to delete (or change ownership) of files that only TrustedInstaller has full rights for?

For some crazy reason in 2006 I copied 1GB of of system files to an external hard drive as part of a manual backup. These files are completely useless so I want to delete them... but as you might guess, I don't have access even as member of the Administrator's group. Thanks to article http://technet.microsoft.com/en-us/magazine/2007.06.acl.aspx I've looked through their ACLs and determined these files all have owner=TrustedInstaller and only TrustedInstaller has full rights. All other ACL entries (including local system and Administrators) only have read/write, so I can't delete these files.

Perhaps someone knows of a utility or steps that can either ignore NTFS ACLs for delete OR perhaps generate a manifest and trigger uninstall of specified target files.

# re: SYSK 277: How-To Bring Back the TrustedInstaller

Sunday, April 19, 2009 6:58 PM by Chris Bering

Open an elevated command prompt:

takeown /F "G:\path\goes\here\*" /A /R /D Y

Then grant yourself full priviledges and delete away.

# re: SYSK 277: How-To Bring Back the TrustedInstaller

Monday, July 06, 2009 8:48 AM by David

I tried this (Vista Home Premo). CL response was success but ownership was NOT changed.

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker