How do I un-protect a file?
- I would like to un-protect a specific file in a Program Files (x86) subfolder, which the system will not allow me to change without requiring administrative approval (UAC). Is this possible? The file is C:\Program Files (x86)\Mozilla Firefox\defaults\pref\Firefox.js, and I need the system login script to be able to check and modify this file regardless of who is logged in. Is this possible? (I come from an XP background where there was no obstacle to doing such a thing, and I never used Vista, which may behave like this as well.) TIA - JR
ps I'm using Win7RC.
Answers
Hello,
According to your requirement, I suggest you disable UAC in Windows 7, which is similar to steps to disable UAC in Windows Vista, only with slight user interface change, and there is plenty of methods to turn off UAC too.
Method 1: Disable or Turn Off UAC (User Account Control) in Control Panel
- To user Control Panel to disable UAC in Windows 7, login the system with the administrative account, go to Start Menu -> Control Panel -> User Accounts
- Click on Change User Account Control settings link.
- Slide the slider bar to the lowest value (towards Never Notify me when)
For more information about those four values, please refer to the following webpage
User Account Control (UAC) settings in Windows 7
- Click OK to make the change effective.
- Restart the computer to turn off User Access Control.
Method 2: Disable UAC with Registry Editor
- Run Registry Editor (RegEdit).
- Navigate to the following registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System
- Locate the following REG_DWORD value:
EnableLUA
- Set the value of EnableLUA to 0.
- Optional step to suppress UAC consent prompt dialog, locate the following REG_DWORD value:
ConsentPromptBehaviorAdmin
- Set the value of ConsentPromptBehaviorAdmin to 0 (optional).
- Exit from Registry Editor and restart the computer to turn off UAC
For more details about UAC, please refer to the following article.
User Account Control Step-by-Step Guide
Hope the above steps work out!
Andy- Marked As Answer byAndy SongMSFT, ModeratorTuesday, November 10, 2009 12:28 PM
All Replies
Hello,
According to your requirement, I suggest you disable UAC in Windows 7, which is similar to steps to disable UAC in Windows Vista, only with slight user interface change, and there is plenty of methods to turn off UAC too.
Method 1: Disable or Turn Off UAC (User Account Control) in Control Panel
- To user Control Panel to disable UAC in Windows 7, login the system with the administrative account, go to Start Menu -> Control Panel -> User Accounts
- Click on Change User Account Control settings link.
- Slide the slider bar to the lowest value (towards Never Notify me when)
For more information about those four values, please refer to the following webpage
User Account Control (UAC) settings in Windows 7
- Click OK to make the change effective.
- Restart the computer to turn off User Access Control.
Method 2: Disable UAC with Registry Editor
- Run Registry Editor (RegEdit).
- Navigate to the following registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System
- Locate the following REG_DWORD value:
EnableLUA
- Set the value of EnableLUA to 0.
- Optional step to suppress UAC consent prompt dialog, locate the following REG_DWORD value:
ConsentPromptBehaviorAdmin
- Set the value of ConsentPromptBehaviorAdmin to 0 (optional).
- Exit from Registry Editor and restart the computer to turn off UAC
For more details about UAC, please refer to the following article.
User Account Control Step-by-Step Guide
Hope the above steps work out!
Andy- Marked As Answer byAndy SongMSFT, ModeratorTuesday, November 10, 2009 12:28 PM
- Is there really no way to un-protect that one file? I don't really want to give up UAC on all the computers on campus for just that one tiny need... - JR
- If you would like to run login script without getting the UAC promotion, you might add the login script to a Task Scheduler and run the Task automatically. Hope it helps!
Hi, if you are able to you can just install Firefox to a location that is not protected by the system (NOT "Program Files (x86), "Program Files", "Windows" etc.) and as far as I know UAC should not prompt you for security reasons in that location, unless your script invokes something that triggers UAC-security besides the systempath.
Ex: C:\Programs\Mozilla Firefox\etcetc

