My company uses a config.xml file to determine where packages will be installed from. The location of the config file that each system should use is set through a registry key. Recently, we discovered that a lot of the systems did not have the correct registry key and need to be corrected.
Here is an example of my problem.
A system will look in HKLM\Software\Custom\Config and see \\USAT001\Custom\ccpconfig.xml as the location for the config file. However, this is incorrect and should be \\USME032\Custom\ccpconfig.xml. Each system at my company uses the first four letter as the location in the computer name. So any system starting with USME should use the \\USME032\Custom\ccpconfig.xml.
How can I script it so a the computer name is examined? Once the computer name is determined, it changes the registry key to the correct location based on the first four letter.
Any help would be appreciate greatly.