Using Ranger to manipulate the users registry
Article Number: 0000000022
Created On: 0000-00-00 00:00:00
Last Updated: 2010-09-10 19:38:02
Number of Views: 1427
Question
How do I change the users registry?
Cause
A large proportion of a users profile and program settings are stored in the registry. The profile and program settings can be configured individually via various program settings and/or control panel options or they can be configured centrally via Ranger or Windows Group policies. Ranger's and Window's policies effectively change the users and computer registry settings. So instead of using a programs' options through a manual process it is possible to directly set them via the registry editor or a registry merge file.
By using a registry merge file it is possible to set one or hundreds of registry settings, in various ways for one or many users. For example if you wanted to set all users desktop background image you could create a registry merge file, incorporate it into your logon script so during logon for all users who run the logon script, the desktop would be changed to an image of your choosing. Any setting in the registry can be manipulated affecting user environment look and feel or security settings.
Ranger manipulates a number of key registry settings to redirect the users home areas or Internet Proxy setting for example. Direct manipulation of the registry should be considered a last resort. In the majority of cases you should be able to find a policy within Ranger or Windows to do what you are looking for. Policies provided by Ranger or Windows have been tested to make sure they don't adversely affect the users or computers. If however you are unable to find a policy that suits your needs, then direct manipulation of the registry maybe the quickest solution.
Resolution
This article looks at a number of ways you can deploy registry key changes to affect one or many users and or computers. Depending on how you intend to deploy the registry keys, the techniques used to locate the required registry keys and what process you need to go through to deploy them will vary.
The decision of which deployment method to use is yours, each method will has its own benefits and negatives.
Scenario 1 You want to control the location of a custom database path via the registry for all computers and all users. Suggested solution Package Rollout is primarily used to deploy software packages however it can also be used to distribute registry keys. Use Ranger Package Builder to identify the registry keys and then use Package Rollout within LAN Ranger to distribute the package to all computers. As Ranger Packages can be distributed to any number of computers.
This can be very useful if you want to install a package containing registry settings to all computers and ensure they get merged into all users profiles.
Note: If you are using roaming profiles then anyone that logs onto a computer with an installed Ranger package will have the registry keys automatically merged into their profile. Therefore the settings will follow them around the network.
Scenario 2 You want to change the Internet explorers proxy settings for users who logon to a particular computer. Suggested solution Identify the registry keys involved by manually searching the registry for the proxy value. Create a registry mergefile and use Ranger React. Ranger React is highly configurable rule based system.
It allows you to create a rule to trigger when a particular event occurs like a specific user logging onto a computer within a defined time range. When the rule is triggered it can then run an application which uses the registry mergefile to update the users Internet Explorer settings, enabling or disabling Internet access.
Instructions
Identifying the registry keys Finding the appropriate registry keys to control a particular setting can be tricky. The Internet may provide the answers however it may require you to manually find the registry keys or using Ranger package builder to find them.
Deploying the registry values to all computers/users Create a package: Logon as high level user, start package builder, make the registry change and then finish the package. For detailed instructions on creating packages refer to the user manual.
To deploy the package: Go to LAN Ranger, Package Rollout, select the package and distribute to the required computers. Deploying the registry values to affect a particular group Using a mergefile, copy the file into the Ranger folder - the exact path is your choice - then open Ranger Administrator and using the scheduler tab create a new job that runs on logon the following command. <server>\ranger\RgrRegUp.exe server\ranger\pathfilename Click apply to save changes.
Users within this group will now have the registry mergefile incorporated into the users profile. Note: values that change the shell environment may not be applied during the first logon. A second logon may be required for the settings to take affect. Deploying the registry values to affect particular users, groups or computers within a specified location Ranger React is rule based system that allows you to choose when a rule is triggered based on the username, list of users, Ranger group, locations, logon times etc.
When triggered the rule can be customised to apply to all the computers, the computer the rule was triggered on, a list of computers, computers in specific locations etc. You can also configure the rule to exclude particular computers or users. This flexibility makes Ranger React ideal for applying programs or registry keys against bespoke numbers of users and or computers. Using a mergefile, copy the file into the Ranger folder - the exact path is your choice - then go to LAN Ranger, Ranger React and create a new rule based on the actions and destinations you wish to affect.
The action should run the following command. server\ranger\RgrRegUp.exe serverrangerpathfilename Deploying the registry values to all computers of a particular OS type i.e. NT. Using the mergefile, copy the content of the mergefile into the bottom of the preshellos.rrg file within the Misc section. server\ranger\preshellOS.rrg
The registry values will be merged into all users who logon to a workstation matching the OS type specified in the file name. E.g. values saved in the PreshellNT.rrg file will affect all NT4, 2K and XP users.
Testing
Manipulating registry settings is not straight forward, therefore it is advised to test each stage separately i.e. test the registry keys you find separately from the deployment method. On a test machine logon as a high level user and locate the registry keys you wish to change with the mergefile. Change the settings to something other than what is stored in the mergefile so you can easily test if the keys get changed. Copy the merge file into the Ranger directory.
Then from the start > run option type the following; serverrangerrgrregup.exe serverrangermergefile.txt If the merge was successfully then the registry key should have changed to the value stored in the mergefile. Press F5 to refresh the registry and confirm that the key has changed. To test the deployment method, use a program that can be easily monitored even in a secure environment. For example if you are using Ranger React configure React to to run calc.exe or notepad.exe instead of rgrregup.exe so you can easily identify if the rule is being triggered.
Applies To
Network Ranger v4.4, v5.x