Symantec Management Platform (Notification Server)

 View Only
  • 1.  scripts xcopy actively fails with exit code 2 - user pressed ctrl+c

    Posted Oct 03, 2011 08:25 AM

    I do some xcopy commands (batch Task) to copy files sometimes when needed in my scripts to the local machine.  The problem is as of late they have been coming back with an exit code of 2.  I know this because I have error conditions to tell me this.

     

    :xcopy
    start /wait xcopy "\\ber-ap15\Installs\VPNConfig" "C:\RISLOG\vpn\" /v /y /e /q /d
    echo %date%,%time%,errorlevel: %errorlevel%,487 Copy vpn Configuration File: End >> c:\RISlog\altiris.log
    if errorlevel 0 if not errorlevel 1 goto :488
    if errorlevel 1 if not errorlevel 2 goto :fail
    if errorlevel 2 if not errorlevel 3 goto :ctrlc

     

    ctrlc returns back to altiris a specific EXIT XXX code that tells why this failed.  I get the errorlevel 2 like 30% of the time.  If I rerun the task again right after this it then is successful.

     

    As I know this is specific there seems to be something going on causing this failure in Altiris.  Wondering if anyone else has experienced this?



  • 2.  RE: scripts xcopy actively fails with exit code 2 - user pressed ctrl+c

    Posted Oct 03, 2011 04:48 PM

    to the log file too?



  • 3.  RE: scripts xcopy actively fails with exit code 2 - user pressed ctrl+c

    Posted Oct 04, 2011 01:02 PM

    Do you mean:

    start /wait xcopy "\\ber-ap15\Installs\VPNConfig" "C:\RISLOG\vpn\" /v /y /e /q /d >> c:\RISlog\altiris.log 2>&1

     

    I'm thinking a window might be popping up for the xcopy possibly.  They maybe hitting the X which maybe returns the same as  ctrl+c.



  • 4.  RE: scripts xcopy actively fails with exit code 2 - user pressed ctrl+c

    Posted Nov 04, 2011 09:35 AM

    you know what I think this is.  When start /wait runs xcopy a second window is opened.  This window displays to the user for a short period of time.  I'm wondering if they are closing this window?

    This to me is a issue with the product as if I have it hidden the entire process should be hidden.



  • 5.  RE: scripts xcopy actively fails with exit code 2 - user pressed ctrl+c

    Posted Nov 29, 2011 09:30 AM

    Does anyone have any suggestions on how to hide this window or prevent it from popping up?  I guess if I remove the start /wait it might not open the second window but then how do I wait for that process to complete before moving on?

     

    Please any suggestions.