Removing the security restrictions from a folder in the Program Files folder
by, February 25th, 2012 at 03:43 PM (21894 Views)
In Windows Vista and Windows 7, the Program Files folder (where many programs' installation folders are located) is protected with security restrictions where administrator privileges are required to write inside that folder. Programs without administrator privileges have their write attempts to this folder redirected to the "VirtualStore" folder in your user account's folder tree. Thus, if you have Trainz installed in the Program Files folder, it is recommended to run Trainz as an administrator so that it can have the administrator privileges necessary to write directly to its installation folder.
It is possible to remove those security restrictions from a folder in the Program Files folder, such as the Auran folder (where your Trainz installations are located), thus removing the requirement of administrator privileges to write to that folder. This is especially helpful for users of TRS2004 or later, as content in these versions is managed directly in its folders inside the Trainz folder. Thus, this modification allows you to edit content files without User Account Control (UAC) dialogs getting in your way.
Below are instructions on how to do this. If any User Account Control dialogs pop up along the way, choose the "Continue" button in them.
1. Right-click the Auran folder in your Program Files folder and select "Properties". In the resulting dialog, choose the "Security" tab, then click the "Edit" button.
2. In the resulting dialog, select the "Users" entry in the "Group or user names" box, then, in the "Permissions for Users" box below that, check the box in the "Allow" column for "Full Control" and make sure all the other "Allow" boxes are checked (except for the "Special Permissions" box). Click the "Apply" button, then click the "OK" button.
3. Back in the Properties dialog, click the "Apply" button (if it is not disabled), then click the "OK" button.
I believe somewhere along the way, it will scan through all of the files in the Auran folder and its subfolders and apply the new permissions. This may take a while. Be patient.
Shaneturner12 has developed a great Permission Generating Tool that can quickly remove the security restrictions for an individual user account from a folder.
To download it, right-click the following link, choose "Save Target As...", and save it to a folder on your computer: http://trainz.shaneturner.co.uk/tuto...runasadmin.exe.
Note that, while the program's executable is named "runasadmin", it does not set up any programs to run as an administrator.
Instructions on its use are below:
1. Right click the tool and select "Run as administrator".
2. A window will appear and the program will ask you for the path to the folder that you want to remove the security restrictions from. Type in the path to your Auran folder (e. g. "C:\Program Files\Auran", without the quotation marks) and press the Enter key on your keyboard to remove the restrictions from the Auran folder and the Trainz installations contained within it.
3. Wait patiently for the program to apply the new permissions to the folder and all of the subfolders and files contained within it. As with the manual method that I wrote about above, this may take a while. Be patient. When the program is done, its window will automatically close.
Note that Shane's tool only removes the restrictions for the user account that you are using when you run the tool.
UPDATE 3/9/2012: Shane has fixed a bug in the Permission Generating Tool and has reuploaded it. If you have already downloaded it, then download it again and use it again on any folders that you have already used it on.
UPDATE 3/10/2012: Shane has fixed another bug in the tool. If you have already downloaded it, then download it again, and if you have already tried to run it on a folder but it crashed, then use it again on that folder.
I hope this is helpful to some users.