Client Management Suite

 View Only
Expand all | Collapse all

deploy all cms plug-in agents

Migration User

Migration UserJan 30, 2013 09:19 AM

  • 1.  deploy all cms plug-in agents

    Posted Jan 23, 2013 12:55 PM

    Any one have any suggestions on the best method to deploy all plug-in agents to a client during deployment?

    When I was working outside of Altiris deployment I used a custom script but can no longer use this method because when the agent restarts from an install it kills the script.

     

    :380
    echo **********************************************************************
    echo *                   380 - SMP Agent Install                          *
    echo **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,380 Symantec Altiris Agent: Begin >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       Agent Check                                  *
    rem  **********************************************************************
    if exist "C:\Program Files\Altiris\Altiris Agent\AeXNSAgent.exe" goto :380a
    echo %date%,%time%,errorlevel: %errorlevel%,380 Symantec Altiris Agent - Not Found >> c:\RISlog\deployment.log
    START /WAIT c:\install3\Symantec\AltirisAgent\AeXNSC.exe -s -a ns=NS.domain.com nsweb=http://NS.domain.com/Altiris /s
    rem START /WAIT c:\install3\Symantec\AltirisAgent\AeXClientUpgrade.exe
    echo %date%,%time%,errorlevel: %errorlevel%,380 Symantec Altiris Agent: End >> c:\RISlog\deployment.log
    ECHO errorlevel: %errorlevel%
    IF ERRORLEVEL 1 GOTO fail
    goto :381
    :380a
    echo **********************************************************************
    echo *                 Start Altiris Agent                                *
    echo **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,Altiris Agent Found >> c:\RISlog\Deployment.log
    echo %date%,%time%,errorlevel: %errorlevel%,Start Altiris Agent: Begin >> c:\RISlog\Deployment.log
    net start AeXNSClient >> c:\RISlog\Deployment.log 2>&1
    echo %date%,%time%,errorlevel: %errorlevel%,Stop Altiris Agent: End >> c:\RISlog\Deployment.log
    ECHO errorlevel: %errorlevel%
    ping 1.1.1.1 -n 1 -w 10000 > nul
    verify >nul
    :381
    echo **********************************************************************
    echo *                   381 - Power Scheme Agent Install                 *
    echo **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,381 Symantec Power Scheme Plug-in: Begin >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       Plugin Check                                 *
    rem  **********************************************************************
    if exist "C:\Program Files\Altiris\Altiris Agent\Agents\PowerSchemeAgent\PowerSchemeAgent.dll" goto :382
    echo %date%,%time%,errorlevel: %errorlevel%,381 Symantec Power Scheme Plug-in - Not Found >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       wait 10 seconds to Begin                     *
    rem  **********************************************************************
    ping 1.1.1.1 -n 1 -w 10000 > nul
    verify >nul
    cd c:\install3\Symantec\PowerAgent
    START /WAIT msiexec.exe /i Altiris_PowerSchemeAgent_x86.msi /qn ALLUSERS=1 REBOOT=ReallySuppress REBOOTPROMPT="S"
    echo %date%,%time%,errorlevel: %errorlevel%,381 Symantec Power Scheme Plug-in: End >> c:\RISlog\deployment.log
    ECHO errorlevel: %errorlevel%
    IF ERRORLEVEL 1 GOTO fail
    ECHO errorlevel: %errorlevel%

    :382
    echo **********************************************************************
    echo *                   382 - Software Update Agent Install              *
    echo **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,382 Symantec PatchManagement Plug-in: Begin >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       Plugin Check                                 *
    rem  **********************************************************************
    if exist "C:\Program Files\Altiris\Altiris Agent\Agents\PatchMgmtAgent\PatchMgmtAgents.dll" goto :383
    echo %date%,%time%,errorlevel: %errorlevel%,382 Symantec PatchManagement Plug-in - Not Found >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       wait 10 seconds to Begin                     *
    rem  **********************************************************************
    ping 1.1.1.1 -n 1 -w 10000 > nul
    verify >nul
    cd c:\install3\Symantec\PatchAgent
    REM START /WAIT MsiExec.exe /qn REBOOT=ReallySuppress /i Altiris_PatchMgmtAgent_Win32_7_0.msi
    START /WAIT MsiExec.exe /qn REBOOT=ReallySuppress /i Altiris_PatchMgmtAgent_Win32_7_1.msi
    echo %date%,%time%,errorlevel: %errorlevel%,382 Symantec PatchManagement Plug-in: End >> c:\RISlog\deployment.log
    ECHO errorlevel: %errorlevel%
    IF ERRORLEVEL 1 GOTO fail
    ECHO errorlevel: %errorlevel%
    :383
    echo **********************************************************************
    echo *                   383 - Out of Band Agent Install                  *
    echo **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,383 Symantec Out of Band Plug-in: Begin >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       Plugin Check                                 *
    rem  **********************************************************************
    if exist "C:\Program Files\Altiris\Altiris Agent\Agents\OOB Agent\OOBAgent.dll" goto :384
    echo %date%,%time%,errorlevel: %errorlevel%,383 Symantec Out of Band Plug-in - Not Found >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       wait 10 seconds to Begin                     *
    rem  **********************************************************************
    ping 1.1.1.1 -n 1 -w 10000 > nul
    verify >nul
    cd c:\install3\Symantec\OOBAgent
    START /WAIT Slaunch32.exe /inifile:OOBTaskAgent.ini
    echo %date%,%time%,errorlevel: %errorlevel%,383 Symantec Out of Band Plug-in: End >> c:\RISlog\deployment.log
    ECHO errorlevel: %errorlevel%
    IF ERRORLEVEL 1 GOTO fail
    ECHO errorlevel: %errorlevel%
    :384
    echo **********************************************************************
    echo *                   384 - Software Management Solution Agent Install *
    echo **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,384 Symantec Software Management Solution Plug-in: Begin >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       Plugin Check                                 *
    rem  **********************************************************************
    if exist "C:\Program Files\Altiris\Altiris Agent\Agents\Software Management Solution Plugin\SoftwareManagementSolution_Agent.dll" goto :385
    echo %date%,%time%,errorlevel: %errorlevel%,384 Symantec Software Management Solution Plug-in - Not Found >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       wait 10 seconds to Begin                     *
    rem  **********************************************************************
    ping 1.1.1.1 -n 1 -w 10000 > nul
    verify >nul
    cd c:\install3\Symantec\SMSolutionAgent
    rem START /WAIT msiexec.exe /i "Software Management Solution Agent_7_0_rev1.msi" /qn
    START /WAIT msiexec.exe /i "SoftwareManagementSolution_Plugin_x86.msi" ALLUSERS=1 INSTALLPORTAL=1 PORTALSTARTMENU=TRUE PORTALDESKTOPMENU=TRUE PORTALADDREMOVE=TRUE PORTALAGENTMENU=TRUE /qn
    echo %date%,%time%,errorlevel: %errorlevel%,384 Symantec Software Management Solution Plug-in: End >> c:\RISlog\deployment.log
    ECHO errorlevel: %errorlevel%
    IF ERRORLEVEL 1 GOTO fail
    ECHO errorlevel: %errorlevel%
    :385
    echo **********************************************************************
    echo *                   385 - Inventory Agent Install                    *
    echo **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,385 Symantec Inventory Plug-in: Begin >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       Plugin Check                                 *
    rem  **********************************************************************
    if exist "C:\Program Files\Altiris\Altiris Agent\Agents\Inventory Agent\InvAgent.dll" goto :386
    echo %date%,%time%,errorlevel: %errorlevel%,385 Symantec Inventory Plug-in - Not Found >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       wait 10 seconds to Begin                     *
    rem  **********************************************************************
    ping 1.1.1.1 -n 1 -w 10000 > nul
    verify >nul
    cd c:\install3\Symantec\InvAgent
    START /WAIT msiexec.exe /i Symantec_InventoryAgent_x86.msi /qn REBOOT=ReallySuppress ALLUSERS=1
    echo %date%,%time%,errorlevel: %errorlevel%,385 Symantec Inventory Plug-in: End >> c:\RISlog\deployment.log
    ECHO errorlevel: %errorlevel%
    IF ERRORLEVEL 1 GOTO fail
    ECHO errorlevel: %errorlevel%
    :386
    echo **********************************************************************
    echo *                   386 - Application Metering Agent Install         *
    echo *                     Pre-requisite Inventory Solution agent         *
    echo **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,386 Symantec Application Metering Plug-in: Begin >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       Plugin Check                                 *
    rem  **********************************************************************
    if exist "C:\Program Files\Altiris\Altiris Agent\Agents\Application Metering Agent\AMAgent.dll" goto :386
    echo %date%,%time%,errorlevel: %errorlevel%,386 Symantec Application Metering Plug-in - Not Found >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       wait 10 seconds to Begin                     *
    rem  **********************************************************************
    ping 1.1.1.1 -n 1 -w 10000 > nul
    verify >nul
    cd c:\install3\Symantec\AppMeterAgent
    START /WAIT msiexec.exe /i AMAgentSetup.msi /qn REBOOT=ReallySuppress ALLUSERS=1
    echo %date%,%time%,errorlevel: %errorlevel%,386 Symantec Application Metering Plug-in: End >> c:\RISlog\deployment.log
    ECHO errorlevel: %errorlevel%
    IF ERRORLEVEL 1 GOTO fail
    ECHO errorlevel: %errorlevel%
    :387
    echo **********************************************************************
    echo *                   387 - Deployment x86 Agent Install               *
    echo **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,387 Symantec Deployment Plug-in: Begin >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       Plugin Check                                 *
    rem  **********************************************************************
    if exist "C:\Program Files\Altiris\Altiris Agent\Agents\Deployment\Agent\DeploymentSolutionAgent.dll" goto :388
    echo %date%,%time%,errorlevel: %errorlevel%,387 Symantec Deployment Plug-in - Not Found >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       wait 10 seconds to Begin                     *
    rem  **********************************************************************
    ping 1.1.1.1 -n 1 -w 10000 > nul
    verify >nul
    cd c:\install3\Symantec\deployAgent
    START /WAIT msiexec.exe /i "Altiris_DeploymentSolutionAgent_7_1_x86.msi" skipaim=1 /qn REBOOT=ReallySuppress
    echo %date%,%time%,errorlevel: %errorlevel%,387 Symantec Deployment Plug-in: End >> c:\RISlog\deployment.log
    ECHO errorlevel: %errorlevel%
    IF ERRORLEVEL 1 GOTO fail
    ECHO errorlevel: %errorlevel%
    :388
    echo **********************************************************************
    echo *                   388 - PCAnywhere Agent Install                   *
    echo **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,388 Symantec PCAnywhere Plug-in: Begin >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       Plugin Check                                 *
    rem  **********************************************************************
    if exist "C:\Program Files\Symantec\pcAnywhere\pcAAgent.dll" goto :389
    echo %date%,%time%,errorlevel: %errorlevel%,388 Symantec PCAnywhere Plug-in - Not Found >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       wait 10 seconds to Begin                     *
    rem  **********************************************************************
    ping 1.1.1.1 -n 1 -w 10000 > nul
    verify >nul
    cd c:\install3\Symantec\pcAAgent
    START /WAIT pcAClientInstallManager.exe /iall
    echo %date%,%time%,errorlevel: %errorlevel%,388 Symantec PCAnywhere Plug-in: End >> c:\RISlog\deployment.log
    ECHO errorlevel: %errorlevel%
    IF ERRORLEVEL 1 GOTO fail
    ECHO errorlevel: %errorlevel%
    echo %date%,%time%,errorlevel: %errorlevel%,388 PCAnywhere HKLM: Begin >> c:\RISlog\deployment.log
    START /WAIT REGEDIT /S c:\install3\Symantec\pcAAgent\pcAnywhere.reg >> c:\RISlog\deployment.log
    echo %date%,%time%,errorlevel: %errorlevel%,388 PCAnywhere HKLM: End >> c:\RISlog\deployment.log
    rem echo **********************************************************************
    rem echo *                   388a - PCAnywhere Agent Patch                    *
    rem echo **********************************************************************
    rem  **********************************************************************
    rem  *                       wait 10 seconds to Begin                     *
    rem  **********************************************************************
    rem ping 1.1.1.1 -n 1 -w 10000 > nul
    rem verify >nul
    rem echo %date%,%time%,errorlevel: %errorlevel%,388a Symantec PCAnywhere TECH180472: Begin >> c:\RISlog\deployment.log
    rem cd "c:\install3\Symantec\PCAnywhere_12.x_Tech182142"
    rem START /WAIT msiexec.exe /i PCAnywhere_12.x_Tech182142.MSI /qn ALLUSERS=2
    rem echo %date%,%time%,errorlevel: %errorlevel%,388a Symantec PCAnywhere TECH180472: End >> c:\RISlog\deployment.log
    cd c:\install3
    :389
    echo **********************************************************************
    echo *                   389 - SMP Agent File Cleanup                     *
    echo **********************************************************************
    rem  **********************************************************************
    rem  *                       wait 10 seconds to Begin                     *
    rem  **********************************************************************
    ping 1.1.1.1 -n 1 -w 10000 > nul
    verify >nul

    I'm thinking the only way to do this is to create a software package for every agent.  It sure would be nice if these were already created as part of the product.

    Suggestions?



  • 2.  RE: deploy all cms plug-in agents

    Posted Jan 23, 2013 04:18 PM
    https://www-secure.symantec.com/connect/downloads/installing-altiris-symantec-mangement-agent-and-sub-agents-quickly We used this script with a few modifications to uninstall and then install the agent at startup HTH C


  • 3.  RE: deploy all cms plug-in agents

    Posted Jan 24, 2013 12:08 PM

    carlsson,

    Not sure this helps me as it is what I already do.  My question is how can I do this or something like it when the agent restarts itself during these installs causing the script and job to stop and fail.  Is there a point or something in the deployment where this would make sense to complete successfully?



  • 4.  RE: deploy all cms plug-in agents

    Posted Jan 24, 2013 02:04 PM
    we don't have an issue with the agent restarting, the script installs the agent, deployment plugin, management solution agent and inventory as this is enough to deploy software pretty much right away, we leave the policies to install the app metering power management etc works pretty quickly for us I'll post my script tomorrow C


  • 5.  RE: deploy all cms plug-in agents

    Posted Jan 24, 2013 03:00 PM

    I need a solution to install all plug-in's.  I already have a script which is basically exactly what is posted in that link you described the thing is if the plug-in requires the agent to restart it kills the script.



  • 6.  RE: deploy all cms plug-in agents

    Posted Jan 24, 2013 05:13 PM
    why not put ping to wait say 10 seconds while the agent stops and then a tasklist to check for the agent running again then continue the script. After every agent/plug in that reboots the agent ? I have a loop that does this i can post tomorrow if that helps ? C


  • 7.  RE: deploy all cms plug-in agents

    Posted Jan 24, 2013 05:17 PM

    If you look at my script above you will see I already do this.  I don't believe you are understanding my issue.



  • 8.  RE: deploy all cms plug-in agents

    Posted Jan 24, 2013 05:23 PM
    looks to me like you are only checking to see if a file exists not if the agent is running? tasklist /FI "IMAGENAME eq myapp.exe" 2>NUL | find /I /N "myapp.exe">NUL if "%ERRORLEVEL%"=="0" echo Programm is running modify the above


  • 9.  RE: deploy all cms plug-in agents

    Posted Jan 28, 2013 03:30 PM

    carlsson, you are not understanding what I'm asking here.  I have a Deployment Job which has task in it. One of the task runs a script that executes the code above.  This script because of the plugin's restarts the Altiris Agent causing the script to not continue and also to return a failure result (The task was stopped by the user.) for the job.

    I need to know how someone in a JOB is deploying the plugin's to the agent.  The only thing I can think of is I set this to run outside of altiris like upon a log on via registry but how do I report on this to the job and continue with my other task?



  • 10.  RE: deploy all cms plug-in agents

    Posted Jan 28, 2013 05:06 PM

    We place a VBScript and .bat file in a software resource.  The software resource runs the .vbs which copies the files from the software resource into a migration directory on C: (thus preventing files it needs from being deleted when the agent is uninstalled or reinstalled or upgraded).  It also copies over any migration files needed like AeXNSC.exe, plug-ins, etc.

    When the VBScript runs, it calls a batch file.  The VBScript has succeeded and returns a success to the Symantec Management Agent.  Even if the SMA is killed or restarted, it will not interfere with the batch file since the batch file is running separately.

    I hope this helps!



  • 11.  RE: deploy all cms plug-in agents

    Posted Jan 28, 2013 05:21 PM

    vbs call is a good option as it won't stay open waiting for the batch to complete but...  When do you run this task?  Is there a way to run task after kicking off this task?  I would like to get the agent portion out of the way early and then perform other scripting task after this in the job but I'm thinking this might have to be the last task.

    One reason is install control I have had situations where I try to run a program install say office and the agent is in process of a plugin install preventing my msi from being able to start.  That is why I would like to get these out of the way sooner rather then later.  Any ideas?



  • 12.  RE: deploy all cms plug-in agents

    Posted Jan 30, 2013 08:51 AM

    Any ideas on how I pause a job for this or pause Altiris from auto installing the agents?  I had this problem in one of my scripts yesterday and it killed the rest of the script because of it installing a plug-in that restarts the agent.



  • 13.  RE: deploy all cms plug-in agents

    Posted Jan 30, 2013 09:19 AM

    @JLawson, Can you use the Sleep command?



  • 14.  RE: deploy all cms plug-in agents

    Posted Jan 30, 2013 10:54 AM

    if it is something that is a command on the desktop and not in the job I don't see how this would work when the agent gets restarted causing the script running the command to fail.

    I need a way to delay the Job at the NS.



  • 15.  RE: deploy all cms plug-in agents

    Posted Jan 30, 2013 11:13 AM

    Maybe I misunderstood.  What are you trying to do?  Are you removing the old SMA, installing new, and forcing required plug-ins, or are you trying to do a new system build without any SMA?  Where are you calling the job, task, or script from?  And what has to happen next?



  • 16.  RE: deploy all cms plug-in agents

    Posted Jan 30, 2013 12:12 PM

    I believe you understood me just fine.  I just need more process help to the entire thing.

    These are SOI deployments.  They do not have an agent but Symantec puts this in the soi to auto install the agent and DS plug-in.  So that after soi the next task can take off.

    The problem is once the agent is installed it updates policy and says hey I have all these other agents I need to install.

    This then causes failures in the task that start kicking off after the soi job.  So I'm not sure how to resolve this.  First part was installing agents without affecting the current task of installation which you solved.  Next is to get all of this resolved first thing in deployment job so that the rest of the task can run without fear of failure.

    Any ideas on how best to do this?



  • 17.  RE: deploy all cms plug-in agents

    Posted Jan 30, 2013 12:46 PM

    I'd put everything into a batch or .vbs that's called by setupcomplete.cmd, which is called once during Windows 7 mini-setup.  So after SOI, add a Update Configuration task so that you know the agent is ready, and then all the other tasks you mentioned.  Your SOI's mini-setup will call setupcomplete.cmd, which calls the .vbs and/or .bat commands.  Only after this is done will the SOI task report as complete.



  • 18.  RE: deploy all cms plug-in agents

    Posted Jan 30, 2013 05:51 PM

    That would be great but..  Altiris deployment puts in that cmd file a install for the altiris agent and deployment plugin.  Which all sounds good except that it uses the altirisagent install service.  So the setupcommand completes and later it installs the agent via the service.  I guess I could create a batch that is called from setupcomplete.cmd and then loop until it finally finds the altiris agent running as a process.

     

    What do you think or any other suggestions.  Keep them coming and Thanks!



  • 19.  RE: deploy all cms plug-in agents

    Posted Jan 31, 2013 09:42 PM

     Ok kicking off the plug-in installs from the AltirisAgent.bat but as you can see below in the middle right at software management installation it kicks off a task in the JOB.

    Thu 01/31/2013,21:26:11.76,errorlevel: 0,Altiris Agent Found and Running
    Thu 01/31/2013,21:26:11.76,errorlevel: 0,381 Symantec Power Scheme Plug-in: Begin
    Thu 01/31/2013,21:26:11.77,errorlevel: 0,381 Symantec Power Scheme Plug-in - Not Found
    Thu 01/31/2013,21:26:21.65,errorlevel: 0,381 Symantec Power Scheme Plug-in Install: Begin
    Thu 01/31/2013,21:26:22.26,errorlevel: 0,381 Symantec Power Scheme Plug-in Install: End
    Thu 01/31/2013,21:26:22.26,errorlevel: 0,381 Symantec Power Scheme Plug-in: End
    Thu 01/31/2013,21:26:22.27,errorlevel: 0,382 Symantec PatchManagement Plug-in: Begin
    Thu 01/31/2013,21:26:22.27,errorlevel: 0,382 Symantec PatchManagement Plug-in - Not Found
    Thu 01/31/2013,21:26:32.75,errorlevel: 0,382 Symantec PatchManagement Plug-in: End
    Thu 01/31/2013,21:26:32.75,errorlevel: 0,383 Symantec Out of Band Plug-in: Begin
    Thu 01/31/2013,21:26:32.75,errorlevel: 0,383 Symantec Out of Band Plug-in - Not Found
    Thu 01/31/2013,21:26:55.37,errorlevel: 0,383 Symantec Out of Band Plug-in: End
    Thu 01/31/2013,21:26:55.39,errorlevel: 0,384 Symantec Software Management Solution Plug-in: Begin
    Thu 01/31/2013,21:26:55.39,errorlevel: 0,384 Symantec Software Management Solution Plug-in - Not Found
    **********************************************************************
    Thu 01/31/2013,21:26:56.39,errorlevel: 0,Feature Changes: Begin
    Thu 01/31/2013,21:26:56.39,errorlevel: 0,Feature Disable: Begin

    Deployment Image Servicing and Management tool
    Version: 6.1.7600.16385

    Image Version: 6.1.7600.16385

    Disabling feature(s)
    The operation completed successfully.

    Thu 01/31/2013,21:27:25.79,errorlevel: 0,385 Symantec Inventory Plug-in: End
    Thu 01/31/2013,21:27:25.79,errorlevel: 0,386 Symantec Application Metering Plug-in: Begin
    Thu 01/31/2013,21:27:25.79,errorlevel: 0,386 Symantec Application Metering Plug-in - Not Found
    Thu 01/31/2013,21:27:43.08,errorlevel: 0,386 Symantec Application Metering Plug-in: End
    Thu 01/31/2013,21:27:43.08,errorlevel: 0,387 Symantec Deployment Plug-in: Begin
    Thu 01/31/2013,21:27:43.08,errorlevel: 0,388 Symantec PCAnywhere Plug-in: Begin
    Thu 01/31/2013,21:27:43.08,errorlevel: 0,388 Symantec PCAnywhere Plug-in - Not Found
    Thu 01/31/2013,21:29:43.84,errorlevel: 0,388 Symantec PCAnywhere Plug-in: End
    Thu 01/31/2013,21:29:43.84,errorlevel: 0,388 PCAnywhere HKLM: Begin
    Thu 01/31/2013,21:29:43.89,errorlevel: 0,388 PCAnywhere HKLM: End
    Thu 01/31/2013,21:29:43.89,errorlevel: 0,388 Symantec Plug-in install Success

     

    Then either software or inventory restarts and kills the task that was running.

    Any other ideas?

     

     



  • 20.  RE: deploy all cms plug-in agents

    Posted Feb 01, 2013 11:53 AM

    Yes, modify AltirisAgent.bat so that you are the one installing the agent using a copy of AeXNSC.exe that you pull from your Notification Server.  Don't use AltirisAgentInstSvc or whatever it's called -- it's incredibly slow and is the reason why we always modify AltirisAgent.bat when doing scripted installs for our customers.



  • 21.  RE: deploy all cms plug-in agents

    Posted Feb 01, 2013 12:02 PM

    ok didn't know if I could pull that out or not.  Still thinking XP deployment how I can't modify that file at all.  This sounds good because this will allow me to pull out all my logic for waiting for the agent install.  Is there a command also to run that would prevent the agent from talking to the NS for a period of time or something after it is installed?  Like to force a 5 minute blackout?  I know I can do this in the agent settings but I don't want to have it affect all my machines.



  • 22.  RE: deploy all cms plug-in agents

    Posted Feb 01, 2013 01:44 PM

    You could stop the service then set up a scheduled task (or ping for five minutes) before re-enabling it.



  • 23.  RE: deploy all cms plug-in agents

    Posted Feb 01, 2013 02:11 PM

    The problem with that is I believe upon every plug-in install it starts the agent back up.  Although I have been being proved wrong so far but on XP I know as the plug-in's start installing they start the agent.



  • 24.  RE: deploy all cms plug-in agents

    Posted Feb 01, 2013 02:14 PM

    If you stop it and disable it, then enable it and start it, that should prevent the plug-ins from starting it.



  • 25.  RE: deploy all cms plug-in agents

    Posted Feb 04, 2013 10:16 AM

    Mclemson,

    hey this did not work if I try to rem those lines put in by altiris it modifies thems so they are no longer commented out.



  • 26.  RE: deploy all cms plug-in agents

    Posted Feb 04, 2013 10:37 AM

    If you modify AltirisAgent.bat or setupcomplete.cmd, the files will be modified if you use a SOI task.  If you simply use your own command line, however, there's no problem.  You are using jobs and tasks to do a scripted operating system install, not using the Scripted OS Install (SOI) task.  But you can leverage the SOI files.  I hope that makes sense.  The SOI tasks rebuilds everything and will overwrite changes, so you don't actually want to use the built-in tasks.  Write your own scripts.  Sorry, I thought that's what you were doing already.



  • 27.  RE: deploy all cms plug-in agents
    Best Answer

    Posted Apr 17, 2013 08:42 AM

    I'm going to add what has been working for me and mark this as a solution.  First I want to say the real problem here is policies kicking off during a deployment job which I have moved that conversation over to:

    https://www-secure.symantec.com/connect/forums/prevent-software-management-policies-running-during-deployment-job-task

    So what I'm doing to resolve this is:

    In my image location I'm holding the agent and all plugin's in this location (sources\$OEM$\$1\Install3\Symantec).  This gets copied to the machien by default.

    Then in this location: sources\$OEM$\$$\Setup\Scripts

    I have modified the AltirisAgent.bat (default created file by symantec soi) to add this to the end of everything in the file:


    if not exist C:\RISlog mkdir C:\RISlog
    echo ********************************************************************** >> c:\RISlog\deployment.log
    echo %date%,%time%,errorlevel: %errorlevel%,setupcomplete.CMD: Begin >> c:\RISlog\deployment.log
    %WINDIR%/setup/scripts/Agent.bat

    Note: you can not modify the setupcomplete.cmd and get it to work.  I'm not sure why but this is why I use the above method.  Also you must add anything to the end of the above bat file because if you insert it anywhere else the next time you run SOI it is going to then modify that file because the top part has changed.

    Agent.bat

    echo %date%,%time%,errorlevel: %errorlevel%,setupcomplete.CMD: End >> c:\RISlog\deployment.log
    verify >nul
    echo ********************************************************************** >> c:\RISlog\deployment.log
    :380
    echo **********************************************************************
    echo *                   380 - SMP Agent Install                          *
    echo **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,380 Symantec Altiris Agent: Begin >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       Agent Check and Install                      *
    rem  **********************************************************************
    if exist "C:\Program Files\Altiris\Altiris Agent\AeXNSAgent.exe" goto :380a
    echo %date%,%time%,errorlevel: %errorlevel%,380 Symantec Altiris Agent - Not Found >> c:\RISlog\deployment.log
    START /WAIT c:\install3\Symantec\AltirisAgent\AeXNSC.exe -s -a ns=NS.domain.com nsweb=http://NS.domain.com/Altiris /s
    rem START /WAIT c:\install3\Symantec\AltirisAgent\AeXClientUpgrade.exe
    echo %date%,%time%,errorlevel: %errorlevel%,380 Symantec Altiris Agent: End >> c:\RISlog\deployment.log
    ECHO errorlevel: %errorlevel%
    IF ERRORLEVEL 1 GOTO fail
    goto :381

    rem  **********************************************************************
    rem  *                       Agent Check                                  *
    rem  **********************************************************************
    setlocal EnableDelayedExpansion
    rem set loop counter for up to 2 minutes
    set X=12
    rem set loop counter for up to 6.25 minutes
    set W=25
    echo %date%,%time%,errorlevel: %errorlevel%,Stop Altiris Agent: Begin >> c:\RISlog\Deployment.log
    if not exist "C:\Program Files\Altiris\Altiris Agent\AeXNSAgent.exe" goto :aexnotfound
    goto :aexfound
    :aexnotfound
    echo %date%,%time%,errorlevel: %errorlevel%,Altiris Agent Not Found >> c:\RISlog\Deployment.log
    echo **********************************************************************
    echo *                       Loop Wait 10 Sec                             *
    echo **********************************************************************
    echo waiting 30 seconds >> c:\RISlog\Deployment.log
    ping 1.1.1.1 -n 1 -w 30000 > nul
    verify >nul
    goto :aexfound

    :aexfound
    if not exist "C:\Program Files\Altiris\Altiris Agent\AeXNSAgent.exe" goto :1Loop
    echo %date%,%time%,errorlevel: %errorlevel%,Altiris Agent Running check >> c:\RISlog\Deployment.log
    tasklist /FI "IMAGENAME eq AeXNSAgent.exe" 2>NUL | find /I /N "AeXNSAgent.exe">NUL
    IF ERRORLEVEL 0 IF NOT ERRORLEVEL 1 GOTO :380a
    goto :1Loop

    :1LOOP
    echo **********************************************************************
    echo *                       Loop Wait 10 Sec                             *
    echo **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,Altiris Agent Running WAIT >> c:\RISlog\Deployment.log
    if !M! gtr !W! goto :fail
    echo waiting 15 seconds >> c:\RISlog\Deployment.log
    ping 1.1.1.1 -n 1 -w 15000 > nul
    verify >nul
    set /a M+=1
    echo %date%,%time%,errorlevel: %errorlevel%,Altiris Agent Not Running: Value M = %M% >> c:\RISlog\Deployment.log
    GOTO :aexfound

    :380a
    REM **********************************************************************
    REM *                  Agent Check - COMPLETE                            *
    REM **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,Altiris Agent Found >> c:\RISlog\Deployment.log
    verify >nul
    GOTO :381

    :381
    echo **********************************************************************
    echo *                   381 - Deployment x64 Agent Install               *
    echo **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,381 Symantec Deployment Plug-in: Begin >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       Plugin Check                                 *
    rem  **********************************************************************
    if exist "C:\Program Files\Altiris\Altiris Agent\Agents\Deployment\Agent\DeploymentSolutionAgent.dll" goto :382
    echo %date%,%time%,errorlevel: %errorlevel%,381 Symantec Deployment Plug-in - Not Found >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       wait 10 seconds to Begin                     *
    rem  **********************************************************************
    ping 1.1.1.1 -n 1 -w 10000 > nul
    verify >nul
    cd c:\install3\Symantec\deployAgent
    START /WAIT msiexec.exe /i "Altiris_DeploymentSolutionAgent_7_1_x64.msi" skipaim=1 /qn REBOOT=ReallySuppress
    echo %date%,%time%,errorlevel: %errorlevel%,381 Symantec Deployment Plug-in: End >> c:\RISlog\deployment.log
    ECHO errorlevel: %errorlevel%
    IF ERRORLEVEL 1 GOTO fail
    ECHO errorlevel: %errorlevel%
    :382
    echo **********************************************************************
    echo *                   382 - Software Update Agent Install              *
    echo **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,382 Symantec PatchManagement Plug-in: Begin >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       Plugin Check                                 *
    rem  **********************************************************************
    if exist "C:\Program Files\Altiris\Altiris Agent\Agents\PatchMgmtAgent\PatchMgmtAgents.dll" goto :383
    echo %date%,%time%,errorlevel: %errorlevel%,382 Symantec PatchManagement Plug-in - Not Found >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       wait 10 seconds to Begin                     *
    rem  **********************************************************************
    rem ping 1.1.1.1 -n 1 -w 10000 > nul
    verify >nul
    cd c:\install3\Symantec\PatchAgent
    REM START /WAIT MsiExec.exe /qn REBOOT=ReallySuppress /i Altiris_PatchMgmtAgent_Win32_7_0.msi
    START /WAIT MsiExec.exe /qn REBOOT=ReallySuppress /i Altiris_PatchMgmtAgent_Win64_7_1.msi
    echo %date%,%time%,errorlevel: %errorlevel%,382 Symantec PatchManagement Plug-in: End >> c:\RISlog\deployment.log
    ECHO errorlevel: %errorlevel%
    IF ERRORLEVEL 1 GOTO fail
    ECHO errorlevel: %errorlevel%
    :383
    echo **********************************************************************
    echo *                   383 - Out of Band Agent Install                  *
    echo **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,383 Symantec Out of Band Plug-in: Begin >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       Plugin Check                                 *
    rem  **********************************************************************
    if exist "C:\Program Files\Altiris\Altiris Agent\Agents\OOB Agent\OOBAgent.dll" goto :384
    echo %date%,%time%,errorlevel: %errorlevel%,383 Symantec Out of Band Plug-in - Not Found >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       wait 10 seconds to Begin                     *
    rem  **********************************************************************
    ping 1.1.1.1 -n 1 -w 10000 > nul
    verify >nul
    cd c:\install3\Symantec\OOBAgent
    START /WAIT Slaunch32.exe /inifile:OOBTaskAgent.ini
    echo %date%,%time%,errorlevel: %errorlevel%,383 Symantec Out of Band Plug-in: End >> c:\RISlog\deployment.log
    ECHO errorlevel: %errorlevel%
    IF ERRORLEVEL 1 GOTO fail
    ECHO errorlevel: %errorlevel%
    :384
    echo **********************************************************************
    echo *                   384 - Software Management Solution Agent Install *
    echo **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,384 Symantec Software Management Solution Plug-in: Begin >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       Plugin Check                                 *
    rem  **********************************************************************
    if exist "C:\Program Files\Altiris\Altiris Agent\Agents\Software Management Solution Plugin\SoftwareManagementSolution_Agent.dll" goto :385
    echo %date%,%time%,errorlevel: %errorlevel%,384 Symantec Software Management Solution Plug-in - Not Found >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       wait 10 seconds to Begin                     *
    rem  **********************************************************************
    ping 1.1.1.1 -n 1 -w 10000 > nul
    verify >nul
    cd c:\install3\Symantec\SMSolutionAgent
    START /WAIT msiexec.exe /i "SoftwareManagementSolution_Plugin_x64.msi" ALLUSERS=1 INSTALLPORTAL=1 PORTALSTARTMENU=TRUE PORTALDESKTOPMENU=TRUE PORTALADDREMOVE=TRUE PORTALAGENTMENU=TRUE /qn
    echo %date%,%time%,errorlevel: %errorlevel%,384 Symantec Software Management Solution Plug-in: End >> c:\RISlog\deployment.log
    ECHO errorlevel: %errorlevel%
    IF ERRORLEVEL 1 GOTO fail
    ECHO errorlevel: %errorlevel%
    :385
    echo **********************************************************************
    echo *                   385 - Inventory Agent Install                    *
    echo **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,385 Symantec Inventory Plug-in: Begin >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       Plugin Check                                 *
    rem  **********************************************************************
    if exist "C:\Program Files (x86)\Altiris\Altiris Agent\Agents\Inventory Agent\InvAgent.dll" goto :386
    echo %date%,%time%,errorlevel: %errorlevel%,385 Symantec Inventory Plug-in - Not Found >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       wait 10 seconds to Begin                     *
    rem  **********************************************************************
    ping 1.1.1.1 -n 1 -w 10000 > nul
    verify >nul
    cd c:\install3\Symantec\InvAgent
    START /WAIT msiexec.exe /i Symantec_InventoryAgent_x86.msi /qn REBOOT=ReallySuppress ALLUSERS=1
    echo %date%,%time%,errorlevel: %errorlevel%,385 Symantec Inventory Plug-in: End >> c:\RISlog\deployment.log
    ECHO errorlevel: %errorlevel%
    IF ERRORLEVEL 1 GOTO fail
    ECHO errorlevel: %errorlevel%
    :386
    echo **********************************************************************
    echo *                   386 - Application Metering Agent Install         *
    echo *                     Pre-requisite Inventory Solution agent         *
    echo **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,386 Symantec Application Metering Plug-in: Begin >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       Plugin Check                                 *
    rem  **********************************************************************
    if exist "C:\Program Files (x86)\Altiris\Altiris Agent\Agents\Application Metering Agent\AMAgent.dll" goto :387
    echo %date%,%time%,errorlevel: %errorlevel%,386 Symantec Application Metering Plug-in - Not Found >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       wait 10 seconds to Begin                     *
    rem  **********************************************************************
    ping 1.1.1.1 -n 1 -w 10000 > nul
    verify >nul
    cd c:\install3\Symantec\AppMeterAgent
    START /WAIT msiexec.exe /i AMAgentSetup.msi /qn REBOOT=ReallySuppress ALLUSERS=1
    echo %date%,%time%,errorlevel: %errorlevel%,386 Symantec Application Metering Plug-in: End >> c:\RISlog\deployment.log
    ECHO errorlevel: %errorlevel%
    IF ERRORLEVEL 1 GOTO fail
    ECHO errorlevel: %errorlevel%
    :387
    echo **********************************************************************
    echo *                   387 - Power Scheme Agent Install                 *
    echo **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,387 Symantec Power Scheme Plug-in: Begin >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       Plugin Check                                 *
    rem  **********************************************************************
    if exist "C:\Program Files\Altiris\Altiris Agent\Agents\PowerSchemeAgent\PowerSchemeAgent.dll" goto :388
    echo %date%,%time%,errorlevel: %errorlevel%,387 Symantec Power Scheme Plug-in - Not Found >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       wait 10 seconds to Begin                     *
    rem  **********************************************************************
    rem ping 1.1.1.1 -n 1 -w 10000 > nul
    verify >nul
    echo %date%,%time%,errorlevel: %errorlevel%,387 Symantec Power Scheme Plug-in Install: Begin >> c:\RISlog\deployment.log
    cd c:\install3\Symantec\PowerAgent
    START /WAIT msiexec.exe /i Altiris_PowerSchemeAgent_x64.msi /qn ALLUSERS=1 REBOOT=ReallySuppress REBOOTPROMPT="S"
    echo %date%,%time%,errorlevel: %errorlevel%,387 Symantec Power Scheme Plug-in Install: End >> c:\RISlog\deployment.log
    echo %date%,%time%,errorlevel: %errorlevel%,387 Symantec Power Scheme Plug-in: End >> c:\RISlog\deployment.log
    IF ERRORLEVEL 1 GOTO fail
    ECHO errorlevel: %errorlevel%
    :388
    echo **********************************************************************
    echo *                   388 - PCAnywhere Agent Install                   *
    echo **********************************************************************
    echo %date%,%time%,errorlevel: %errorlevel%,388 Symantec PCAnywhere Plug-in: Begin >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       Plugin Check                                 *
    rem  **********************************************************************
    if exist "C:\Program Files (x86)\Symantec\pcAnywhere\pcAAgent.dll" goto :389
    echo %date%,%time%,errorlevel: %errorlevel%,388 Symantec PCAnywhere Plug-in - Not Found >> c:\RISlog\deployment.log
    rem  **********************************************************************
    rem  *                       wait 10 seconds to Begin                     *
    rem  **********************************************************************
    ping 1.1.1.1 -n 1 -w 10000 > nul
    verify >nul
    cd c:\install3\Symantec\pcAAgent
    START /WAIT pcAClientInstallManager.exe /iall
    echo %date%,%time%,errorlevel: %errorlevel%,388 Symantec PCAnywhere Plug-in: End >> c:\RISlog\deployment.log
    ECHO errorlevel: %errorlevel%
    IF ERRORLEVEL 1 GOTO fail
    ECHO errorlevel: %errorlevel%
    echo %date%,%time%,errorlevel: %errorlevel%,388 PCAnywhere HKLM: Begin >> c:\RISlog\deployment.log
    START /WAIT REGEDIT /S c:\install3\Symantec\pcAAgent\pcAnywhere.reg >> c:\RISlog\deployment.log
    echo %date%,%time%,errorlevel: %errorlevel%,388 PCAnywhere HKLM: End >> c:\RISlog\deployment.log
    cd c:\install3
    GOTO :end

    :389
    goto :end

    :fail
    echo %date%,%time%,errorlevel: %errorlevel%,389 Symantec Plug-in install failed >> c:\RISlog\deployment.log
    exit
    :end
    echo %date%,%time%,errorlevel: %errorlevel%,389 Symantec Plug-in install Success >> c:\RISlog\deployment.log
    exit

    This process has been working for me successfully.  Basically I slam the NS install before the Agent Install Service has a chance to kick it off and then I put all the plug-in's on right after that.  Doing this during this phase prevents the installs from killing the deployment job.