jratzlaf

New Member
Joined
Nov 4, 2009
Messages
4
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.

pps I know I could accomplish this by turning off UAC, but I'd rather leave it on if possible--that seems a rather extreme solution to the problem!
 
Solution
To modify specific files in the Program Files (x86) subfolder in Windows 7 without disabling User Account Control (UAC), you can use a workaround that involves adjusting the permissions for the file in question. Here are the steps to achieve this:

Steps to Modify the File Permissions:​

  1. Take Ownership of the File:
    • Right-click on the file C:\Program Files (x86)\Mozilla Firefox\defaults\pref\Firefox.js and select "Properties."
    • Go to the "Security" tab.
    • Click on the "Advanced" button.
    • Navigate to the "Owner" tab and click on "Edit."
    • Select your user account and check the box that says, "Replace owner on subcontainers and objects."
    • Click "Apply" and then "OK" to take ownership of the file.
    ...
To modify specific files in the Program Files (x86) subfolder in Windows 7 without disabling User Account Control (UAC), you can use a workaround that involves adjusting the permissions for the file in question. Here are the steps to achieve this:

Steps to Modify the File Permissions:​

  1. Take Ownership of the File:
    • Right-click on the file C:\Program Files (x86)\Mozilla Firefox\defaults\pref\Firefox.js and select "Properties."
    • Go to the "Security" tab.
    • Click on the "Advanced" button.
    • Navigate to the "Owner" tab and click on "Edit."
    • Select your user account and check the box that says, "Replace owner on subcontainers and objects."
    • Click "Apply" and then "OK" to take ownership of the file.
    []Change File Permissions:
    • Right-click on the file Firefox.js and choose "Properties" again.
    • Go to the "Security" tab, and then click on "Edit."
    • Here, you can add your system login script to the list of users and groups with permissions to modify the file.
    • Make sure the required permissions are set for the user or group that your system login script runs under.
    [
    ]Modify the File:
    • Once the permissions are set up correctly, your login script should be able to read and modify the file as needed.

      Additional Notes:​

      • Windows 7, like Vista and newer versions, enforces stricter security measures, including UAC, to protect system files.
      • Altering permissions should be done with caution to prevent security risks.
      • Ensure to revert the changes after completing the required modifications.
      By following these steps, you should be able to allow your system login script to check and modify the specified file without requiring administrative approval each time. This method maintains UAC functionality while granting necessary permissions for file access.
 
Solution