Version Differences for Moving Agent Installation Directory

(Updated instructions)
(Apparently you can do the same with the server (sorta). Going to combine both agents & server into one topic.)
Line 1:
- This article lists how to change the agent installation directory. Certain cases may arise where a new installation cannot be performed/doesn't want to be performed, so you can manually modify the installation settings of an agent to recognize the new directory that it resides. ''It is still recommended to reinstall the agent instead of manually performing an update, and this should article should only be considered a last resort to moving an agent.''   + #REDIRECT [[Moving an Installation to New Directory]]  
       
- = Automatic Method (Easiest) =      
       
- A simple re-install (fake upgrade) of the agent can easily fix this, as running the installer will reconfigure some settings for the agent (for example, a different JAVA_HOME, different agent install path, x86 to x64 architecture on Java, etc.).      
       
- # Locate the version of the agent you need to install. An easy way to do this would be to look at your current agent's '''installed.version''' file.      
- # Download the respective version of the installer from Supportal.      
- # Make a backup of the '''entire agent installation directory''', just so you have a record of the previous settings.      
- # Extract the agent-installer somewhere, and open up an '''Administrative Command Prompt'''.      
- # From the ''Administrative Command Prompt'', navigate to the extracted folder and execute '''install-agent.bat'''.      
- # After moving the agent to a new home, give the installer the path to the agent.      
- # When prompted to upgrade the agent, input '''Y'''.      
- # Answer any remaining questions (including information about the Windows Service). You should be able to answer these questions by using your backed up installed.properties file as a template.      
       
- After the installation completes (and possibly the Windows Service installation), you should be able to bring your agent back online with the new settings in place.      
       
- = Manual Method (Hardest) =      
       
- If a simple reinstall of the agent cannot be done, you can still manually change the settings on the agent to point to the new location...however this opens up room for human error if not configured correctly.      
       
- # Navigate to the '''%AGENT_HOME%''' directory.      
- # Open up the '''\bin\''' subdirectory.      
- # Edit '''ah3agent.cmd''' and change the path to the agent. An easy way to do this might be to find/replace the original/new path.      
- # Edit the '''classpath.conf''' file and change paths to the agent.      
- # Edit the '''ahptool.cmd''' file and change path to the agent.      
- # Edit the '''codestation.cmd''' file and change the path to the agent.      
- # Edit the '''worker-args.conf''' file and change the path to the agent.      
- # Open up the '''..\conf\''' subdirectory.      
- # Edit the '''installed.properties''' file and change the paths to the values you need, '''remembering to escape the string when inputting your path'''.      
       
- === Windows Service ===      
       
- In addition to all the steps in the previous section, you still need to modify the Windows Service so anthill reads in the correct values from the registry. The following steps need to be performed as well:      
       
- # (IF IT EXISTS) Open up the ''%AGENT_HOME\bin\service'' directory and load the '''_agent.cmd''' file. Change the value for paths in here.      
- # (IF IT EXISTS) Open up the ''%AGENT_HOME\bin\service'' directory and load the '''_ah3agent.cmd''' file. Change the value for paths in here.      
- # Open up the ''%AGENT_HOME\bin\service'' directory and load the '''ah3agent.cmd''' file. Change the value for paths in here.      
- # From an '''Administrative Command Prompt''', ''uninstall'' the current Windows Service for the agent, and ''re-install'' it. This is in the documentation under the [http://docs.urbancode.com/anthill3-help-3.8/html/Installation.html#install-windows-agent manual agent installation section]