Symantec Management Platform (Notification Server)

 View Only
  • 1.  Altiris 6 Uninstall Batch File

    Posted Apr 23, 2012 03:06 PM

    After reading about issues regarding redirecting an existing Altiris 6 agent to an SMP 7.1 server, I decided the best route would be to completely remove all remnants of Altiris 6 first.  Wrote a batch file based on a few Symantec KB articles which resulted in my 32-bit VMs not showing up in the SMC as virtual machines after pushing the SMP 7.1 agent to them.  Tech Support wasn't able to help me and, in fact, immediately closed the case once I mentioned that pushing the SMP 7.1 agent to a fresh VM worked and couldn't tell me why my two 32-bit VMs (WinXP Pro and Win7 Pro) had "Computer" as their resource type whereas my Win7 Pro x64 VM properly showed "Virtual Machine".  Of course an SMP 7.1 agent install on a VM that never had the Altiris 6 agent on it would work although this isn't a realistic scenario when my existing environment is running Altiris 6 NS/DS.

    I'm thinking something's not quite right in my batch file so turning to the Connect forum community for guidance.  Please let me know if you see anything wrong in the following command-lines that may've resulted in my 32-bit VMs not showing up as virtual machines in the SMC view.  Thanks in advance!

     

    @echo off

    rem ----------Uninstall AClient----------
    rem Referenced HOWTO8365

    if exist "%programfiles%\altiris\aclient\aclient.exe" Start /Wait "" "%programfiles%\altiris\aclient\aclient.exe" /remove /silent
    if exist "C:\altiris\aclient\aclient.exe" Start /Wait "" "C:\altiris\aclient\aclient.exe" /remove /silent

    DEL /s /q "%windir%\system32\drivers\AlKernel.sys"
    DEL /s /q "%windir%\Temp\alsmb.exe"
    RD /s /q "%programfiles%\Altiris\AClient\"
    RD /s /q "C:\Altiris\AClient\"

    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"


    rem ----------Uninstall DAgent----------
    if exist "%programfiles%\altiris\dagent" Start /Wait "" msiexec.exe /x \\cchaltiris\express\agents\aclient\dagent.msi /quiet
    if exist "%programfiles%\altiris\dagent" Start /Wait "" msiexec.exe /x \\cchaltiris\express\agents\aclient\dagent_x64.msi /quiet


    rem ----------Uninstall Altiris Agent----------
    rem Referenced HOWTO2463
    rem Prevent SEP Uninstall per HOWTO21606

    REG DELETE "HKLM\SOFTWARE\Altiris\Altiris Agent\Plugin Objects\Agents\ConnectSEPAgent" /f

    if exist "%programfiles%\altiris\altiris agent" Start /Wait "" "%programfiles%\altiris\altiris agent\aexagentutil.exe" /uninstallagents /clean
    if exist "%programfiles(x86)%\altiris\altiris agent" Start /Wait "" "%programfiles(x86)%\altiris\altiris agent\aexagentutil.exe" /uninstallagents /clean

    REG DELETE "HKLM\SOFTWARE\Altiris\Altiris Agent" /f
    REG DELETE HKLM\SOFTWARE\Altiris\eXpress /f
    REG DELETE HKLM\SOFTWARE\Altiris\Scheduler /f
    REG DELETE HKLM\SOFTWARE\Altiris\APackageStub /f
    REG DELETE HKLM\SOFTWARE\Classes\AppID\{5E038245-CF81-44BE-8018-9A2981B9DC9B} /f

    rem REG DELETE HKLM\SOFTWARE\Classes\Altiris* /f
    REG EXPORT HKLM\SOFTWARE\Classes %temp%\classes.txt
    FIND "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Altiris" "%temp%\classes.txt" > "%temp%\to_del.txt"
    rem Space Required After DELIMS=[]
    FOR /F "DELIMS=[] " %%a IN (%temp%\to_del.txt) DO REG DELETE "%%a" /f
    DEL /q "%temp%\classes.txt"
    DEL /q "%temp%\to_del.txt"

    DEL /q "%windir%\aex*"



  • 2.  RE: Altiris 6 Uninstall Batch File
    Best Answer

    Posted Apr 23, 2012 06:05 PM

    and find aexagentutil.exe /clean works really well without having to use /uninstallagents.



  • 3.  RE: Altiris 6 Uninstall Batch File

    Posted Apr 23, 2012 07:52 PM

    Cool...I'll give this a shot.  I just followed the command-line in HOWTO2463 for the switches and didn't question its integrity since it appeared to work.  Found one other KB article that seems to indicate specifying a "parameter" (i.e. non-plural) for aexagentutil so perhaps my having 2 switches caused side-effects on some of my test VMs.



  • 4.  RE: Altiris 6 Uninstall Batch File

    Posted Apr 24, 2012 02:32 PM

    I might have to experiment.

    Certainly /clean gets rid of everything in the "Altiris Agent" directory except aexagentutil (that's how I tell it's finished if I'm running it from start > run instead of using start "" /wait from a command line).

    In v7 it might not get rid of pcAnywhere as that's installed under "%programfiles%\Symantec\".