What can AexPatchUtil be used to do? What is the syntax for each command line? What are the return codes that are returned by AexPatchUtil?
AexPatchUtil.exe is a command line utility that provides the ability to execute the following.
|/I||Run All Inventory|
|/Xa||Start Software Update Cycle|
|/f||Forces the installation of one or more software updates, for example: aexpatchutil /f (4E2A75A9-F685-4E80-BBBF-0DE7156818DD)|
|/reboot||reboot only if the Software Update Agent requires a reboot|
|/C||Prompts the Altiris Agent to request a new configuration|
|/q||Run in quiet mode. No user input required.|
Note: The /f switch is capable of taking a list of guids separated with a space and enclosed in parentheses. The guid that is used with the /f switch can be located in many ways but one location is the Resource tab> Resources> Software Management> Software Patch Packages> Software Updates> Security Updates, then right click the desired update and view the Properties to obtain the guid.
When AexPatchUtil executes it simply kicks off the desired action then closes and allows the process to complete on its own. The two codes that are returned by the utility only indicate if it was able to successfully launch the command, not that it completed successfully. For example AexPatchUtil may return a 1 for a success when initiating a software update cycle and the software update cycle could still fail.
1 = Success
0 = Failure
By default it is placed on computers running the Software Update Agent, in the following location; <Install dir>:\Program Files\Altiris\Altiris Agent\Agents\PatchMgmtAgent.
NOTE: Use at your own risk the Exit /b 0 forces a return code of 0
FOR /F "tokens=2*" %%A IN ('REG.EXE QUERY "HKLM\Software\Altiris\Altiris Agent" /V "installdir"') DO SET AgentDir=%%B
echo "%AgentDir%\Agents\PatchMgmtAgent\AeXPatchUtil.exe" /xa /q /c /reboot
exit /b 0