7 Replies Latest reply on Jun 11, 2014 12:39 PM by mvm_101

    EEDK 9.4 Community Edition - Deployment task fails

    mvm_101

      Hi everyone,

       

      It's been quite a while since I have played around with EEDK. I have built a pretty simple package that is supposed to start a batch file which will invoke a VBS file, which in turns copies a data file to a predetermined folder. I have the EEDK-based package checked in to ePO and I can deploy and run it using a client task. So far so good.

       

      However: When McAfee Agent invokes the task, I always seem to get "Error occurred while installing....." in my agent log.

       

      I'm scratching my head trying to remember how to troubleshoot this. Any ideas from anyone? - I have attached a screenshot of my EEDK setup, hopefully that'll yield some clues.

       

      Contents of the batch file named "install.bat":

       

      @echo off

      cscript CopyProfile.vbs

       

      I should add that the vb script runs fine when I run it "by hand" on my test system.

        • 1. Re: EEDK 9.4 Community Edition - Deployment task fails
          spederse

          Your script needs a few more lines to operate. It is also a good idea to test the script running as SYSTEM account before creating the EEDK package.

           

          See this example:

           

          @echo off

            :: Set path 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

          %compsec%  "%SRCDIR%\program.exe" /12345

           

          Exit /B 0

           

           

           

          To test it as SYSTEM account: Download PSEXEC.exe from systinternals and open a system prompt:   psexec.exe /s /i cmd.exe    the dos prompt that opens runs as local system (try the whoami command).

          1 of 1 people found this helpful
          • 2. Re: EEDK 9.4 Community Edition - Deployment task fails

            That is correct.  The way MA currently works you cannot reference a relative path to your source script,  The  working directory for MA is not the pacakge installation folder. These lines properly set the location to your source script.

             

            pushd "%~dp0"

            SET SRCDIR=

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

             

            From here use the %SRCDIR% variable to refernce the locaiton of your script.

             

            Message was edited by: torrycampbell on 6/10/14 12:55:24 PM CDT
            1 of 1 people found this helpful
            • 3. Re: EEDK 9.4 Community Edition - Deployment task fails
              mvm_101

              Thanks for the help guys.

               

              I'm now able to deploy my script, see it run to completion and McAfee Agent displays its popup advising the user that a reboot is needed.

               

              However: When I click "Restart", the popup disappears but the system never restarts. Any thoughts on why that might be?

               

              Message was edited by: mvm_101 on 6/10/14 2:49:22 PM CDT
              • 4. Re: EEDK 9.4 Community Edition - Deployment task fails

                MA processes return codes when the taks it runs completes.  The reason i have you exit with a 0 is that is considered a successful install.  Regarding your Reboot prompt the only way to trigger that is to return the required return code wihcih is 3010.  Not sure why it is not reboot when you click restart.   What retun code are you passing back from the .bat file?  The other point to note is it processes the retun code from the .bat file not the .vbs since the .bat is the command MA launched.

                • 5. Re: EEDK 9.4 Community Edition - Deployment task fails
                  mvm_101

                  Thanks for the response. The BAT file currently llooks like this:

                   

                  @echo off

                   

                    :: Set path 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

                   

                  %compsec%  "%SRCDIR%\CopyProfile.vbs"

                   

                   

                   

                  Exit /B 10

                   

                  So, in other words, the exit code is 10. I set the same code as the "Reboot code" in EEDK and it does seem like MA sees it because it does show the reboot prompt. -Just odd that it doesn't actually reboot.

                  • 6. Re: EEDK 9.4 Community Edition - Deployment task fails

                    I suggest try 3010.  I suspect there may be some other dependencies

                    • 7. Re: EEDK 9.4 Community Edition - Deployment task fails
                      mvm_101

                      Thanks Torry

                       

                      I changed the BAT file to exit with errorlevel 3010, repackaged it and here is the behavior I'm now getting:

                       

                      • The package deploys and runs as expected
                      • MA displays a popup:
                      • MA Reboot 1.JPG
                      • If I click "Restart" the popup will go away and the system will not restart.
                      • If I do nothing and let the timer expire, I will see a second pop up:
                      • MA Reboot 2.JPG
                      • If I click "Yes" then the system will reboot.

                       

                      I should add that when I was using errorlevel 10 as my exit code from the BAT file, I didn't wait long enough to see if the 2nd popup was displayed so the behavior I'm seeing now may be the same as before.

                       

                      Message was edited by: mvm_101 on 6/11/14 12:39:29 PM CDT