How can I uninstall altiris agent on workstation?

Under NS:
1) Goto Configuration Tab.
2) Expand Altiris Agent.
3) Expand Altiris Agent Uninstall
4) Enable the Altiris Agent Uninstall and select which collection you want to apply it to.
5) If necessary, create a new collection and add to it the PCs that you wish to uninstall the Agent from.

 

Here is what I use. It is quick and simple and will clean the GUID from it also in case you want to reinstall the agent.

REM Uninstall All NS Agents

"C:\Program Files\Altiris\Altiris Agent\AeXAgentUtil.exe" /UninstallAgents
"C:\Program Files\Altiris\Altiris Agent\AeXAgentUtil.exe" /ResetGuid
"C:\Program Files\Altiris\Altiris Agent\AeXAgentUtil.exe" /Clean
RD "C:\Program Files\Altiris\Altiris Agent" /s /q
sc delete AltirisACSvc

 

was having issues with garbage being left in the file system and registry with the official uninstall methods so I use the following to scrub a workstation of altiris stuff. Just remember to set your variables at the top for your env

line 3 was used to make the script portable from my DEV to PROD NS/DS, you can comment it out. Use psexec to run remotely

[no-glossary]

rem @echo off
SET DS=
IF NOT %USERDOMAIN%== SET DS=


\\%DS%\express\tools\sysinternals\pskill.exe -accepteula -t aclient
\\%DS%\express\tools\sysinternals\pskill.exe -accepteula -t aclntusr
\\%DS%\express\tools\sysinternals\pskill.exe -accepteula -t aexnsagent


:aclientdetection
\\%DS%\express\tools\sysinternals\psservice.exe -accepteula query aclient
IF NOT %errorlevel% == 0 goto aagentdetection
IF EXIST "%SYSTEMDRIVE%\Altiris\Aclient\aclient.exe" goto aclientremovalA
IF EXIST "%PROGRAMFILES%\Altiris\Aclient\aclient.exe" goto aclientremovalB
:aclientremovalA
start /wait cmd /c "%SYSTEMDRIVE%\Altiris\Aclient\aclient.exe /remove /silent"
%errorlevel%
goto aagentdetection
:aclientremovalB
start /wait cmd /c "%PROGRAMFILES%\Altiris\Aclient\aclient.exe /remove /silent"
%errorlevel%
goto aagentdetection

:aagentdetection
IF NOT EXIST "%PROGRAMFILES%\Altiris\Altiris Agent\AeXAgentUtil.exe" goto :finalcleanup

:aagentremoval
start /wait cmd /c "%programfiles%\altiris agent\AeXAgentUtil.exe /uninstallagents /clean"
%errorlevel%

:Finalcleanup
IF EXIST "%SYSTEMDRIVE%\Altiris\" rd /s /q "%SYSTEMDRIVE%\Altiris\"
IF EXIST "%PROGRAMFILES%\Altiris\" rd /s /q "%PROGRAMFILES%\Altiris\"
IF EXIST "%WINDIR%\TEMP\alsmb.exe" DEL /s /q "%windir%Temp\alsmb.exe"
IF EXIST %systemdrive%\ACLIENT.CFG DEL /s /q "%systemdrive%\AClient.cfg"
rem unregister components
IF EXIST C:\WINDOWS\system32\AeXMenuCtrlLib.dll regsvr32 /u /s C:\WINDOWS\system32\AeXMenuCtrlLib.dll
IF EXIST C:\WINDOWS\system32\AeXNSConsoleUtilities.dll regsvr32 /u /s C:\WINDOWS\system32\AeXNSConsoleUtilities.dll
IF EXIST C:\WINDOWS\system32\AeXTreeCtrlLib.dll regsvr32 /u /s C:\WINDOWS\system32\AeXTreeCtrlLib.dll
%errorlevel%
rem clean registry
reg query HKLM\Software\Altiris
if %errorlevel% == 0 reg delete HKLM\Software\Altiris /f /va
reg query HKLM\SOFTWARE\classes\Appid\{5E038245-CF81-44BE-8018-9A2981B9DC9B}
if %errorlevel% == 0 reg delete HKLM\SOFTWARE\classes\Appid\{5E038245-CF81-44BE-8018-9A2981B9DC9B} /f
REG DELETE HKLM\SYSTEM\CurrentControlSet\Services\AClient /f
REG DELETE HKLM\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_ACLIENT /f
REG DELETE HKLM\SYSTEM\ControlSet001\Enum\Root\LEGACY_ACLIENT /f
REG DELETE HKLM\SYSTEM\ControlSet001\Services\AClient /f
REG DELETE HKLM\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List /f /v "C:\Program Files\Altiris\AClient\AClntUsr.EXE"
REG DELETE HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List /f /v "C:\Program Files\Altiris\AClient\AClntUsr.EXE"

reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Altiris" /f
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Altiris.*" /f

echo looking for misc alt files
del /q %windir%\AeX*
del /q %windir%\system32\AeX*


exit
exit
 
  
  

If you're troubleshooting or upgrading or for whatever reason you need to uninstall the Altiris Agent, here are the steps you can use to remove the Agent and all installed Solution Agents from a client machine (it could be easily scripted).

Commands to uninstall Altiris Agent:

  1. Run the following command line to remove the Altiris Agent using AeXAgentUtil.exe located by default at C:\Program Files\Altiris\Altiris Agent\AeXAgentUtil.exe /uninstallagents /clean (*)
  2. Delete the following Program Files folder if still present: C:\Program Files\Altiris\Altiris Agent (**)
  3. Delete the following Registry key if still present: HKLM\Software\Altiris

* This will remove all sub-agents and attempt to cleanly remove the Altiris Agent from the system.

** This is best practice and could help if we have LoginScript checking existence of this folder.

 
 
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值