Ever need to immediately kick off a patch management update cycle on a machine or group of machine for testing or an emergency patch?
This task will do that for you.
Just import the job into your "jobs and tasks" console
try the following should fix the issue
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
I am having this problem, but I think I know why it said it fails but want some expert to verify if I am right or very wrong!
I do exactly what the others have done, and every single time the job FAILS. It returns a 1 code. But when I look at this page https://support.symantec.com/en_US/article.HOWTO9770.html take a look at what is says - and I believe NORMALY 1 is fail, 0 is success. But that page link above states clearly -> 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
AHA Is the system expecting a code of 0 for success but the agent returning a 1 for success? If so that is a BUG, correct?
Can someone PLEASE PLEASE look at this and tell me - is it REALLY failing all the time, and do I have the quotes placed correctly and is this really a command script? PLEASE verify my command line - are the quotes correctly placed? I've had trouble with this system not liking quotes in some places. I have the switches AFTER the quotes, I assume I need the quotes due to the SPACES in the path, correct? Please also note that this FAILS every single time, dozens of times. It has never ever indicated success. When I check the details of any run it says failed and return code of 1. But note the link I put in above - that page says return code 1 is success. That's backwards from anything else, so that's got to be a bug. 0 is always success - so this will never indicate success, is that not correct? How can I tell if it REALLY succeeded - the computers are hours away, a very long drive so I can't just hope over to one and launch the icon and check the logs easily.
I have this same problem, i get return code 1 from the agent when executing as a task from the console. when i look at the alog on the target system i get <![CDATA[CClientTaskStatusCollector::Task: Execute Software Update Cycle has finished]]>
thanks for this Task.
But if the Altiris Agent is not installed on C Drive or not in the default directory it will fail.
you can find the path in the registry. I changed the script to get the install path from regestry.
:: delims is a TAB followed by a space
FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "HKLM\SOFTWARE\Altiris\Altiris Agent\Plugin Objects\Agents\Altiris Software Update Agent" /v "Install Path"') DO SET SUA_InstallPath=%%B
"%SUA_InstallPath%\AeXPatchUtil.exe" /I /Xa /q /C
work fine for me.
Hi ManelR,
Is this issue reproducible on all targeted machines? What OS is installed on affected machine? Could you please provide us with Agent logs from affected machine captured when task is executed? Agent logs usually are located at C:\ProgramData\Symantec\Symantec Agent\Logs.
Thanks, Roman
Hello,
I've imported this task and executed it (quick run) against a computer. I get a "failed" in the console and, in the management agent, I see an error with a return code of 1.
I can execute the command in the computer from an administrator command line:
"C:\Program Files\Altiris\Altiris Agent\Agents\PatchMgmtAgent\AeXPatchUtil.exe" /I /Xa /q /C without problems and I get in the management agent console the list of new updates ready for deploying (in a pending state).
Why I can't execute it as a task? (I'm using the Symantec Management Agent credentials so it is supposed of being executed as SYSTEM)
Any idea about how to debug what's happening would be very appreciated because this command line is very helpful in force a patch distribution.
Thanks.
as long as the policy is targetting that machine, the agent restart will force an update
Once you restart the agent service it will check new policies targeting that PC.
Would it be possible to do this for Software Management?