0 Replies Latest reply on Oct 9, 2015 12:00 AM by m2chen

    Need help with EEDK Script

    m2chen

      Hi all,

      I need help with EEDK script below.

      The goal is to copy  files from share files to the endpoint.  I am able to build, check-in and deploy this task to the endpoint.

      Looking at the endpoint's status monitor, I can see it does get triggered but no files are being copied over.

       

      If I run this file locally on the endpoint, it runs just fine and I confirmed there is no prompt at all.

       

      Your assistance is greatly appreciated




      @echo off

       

      :: Remi Clavel E-Secure

      ::

      :: Modification was done to install or uninstall a msi depending of input parameter:

      :: - if input parameter is "uninstall" then launch uninstall command

      :: - if there is no input parameter or if it is anything else than "uninstall" launch install command

      ::

       

      :: Get number of input parameters

      set argC=0

      for %%x in (%*) do Set /A argC+=1

       

      :: Stuart Avery McAfee, Inc. 2011

      :: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      :: Confirm x86 Architecture and exit if not found

      If %PROCESSOR_ARCHITECTURE% == x86 (

      GOTO START

      ) ELSE (

      Exit /B 1

      )

      :START

      :: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      :: Torry Campbell McAfee, Inc. 2011

      :: ################################################

      :: Set environment to current product folder

      pushd "%~dp0"

      :: Get software package source directory and set as variable SRCDIR

      SET SRCDIR=

      for /f "delims=" %%a in ('cd') do @set SRCDIR=%%a

       

      START /WAIT NET STOP SERVICE-A


      IF NOT EXIST "C:\ProgramData\abc" GOTO CHECK_ANOTHER_FOLDER

      COPY \\ServerName\SharePath\*.* "C:\ProgramData\abc\" /Y

       

      :CHECK_ANOTHER_FOLDER

      IF NOT EXIST "C:\ProgramData\xyz" GOTO START_SERVICE

      COPY \\ServerName\SharePath\*.* "C:\ProgramData\xyz\" /Y

       

      START /WAIT NET START SERVICE-A

       

      :END

       

      goto EOF

      :: Exit and pass proper exit to agent

      :: ################################################

      :EOF

      Exit /B 0