3 Replies Latest reply on Sep 9, 2013 2:51 PM by sterling22

    Trying to execute a batch file that already exists on a local machine

    Rookie

      Hello,

       

      I am trying to run a batch file that already exists on a local machine and am having troubles.  I have read the document about how batch file distribution works but do not see the solution to my problem.  Here is what is happening:

       

      -I created a batch file that copies another batch file from a server to a local workstation.  I created a batch file distribution package to take care of this and then a scheduled task.  No problems here, it works.  The batch file is copied from the server onto the local machine in the path that I specified.  Good.

       

      -I am now attempting to execute this batch file on the local machine.  To do so, I created a new batch file that will execute the local file.  This batch file does work, I tested it locally and everything works like a charm.  If I put the batch file into a distribution package and execute it via a scheduled task, the scheduled task reports a success, but nothing ever happens on the local machine.  I have tried running the distribution package as 'Local System Account' as well as 'Local User's Account' and I get the same result no matter what.

       

      Any help would be much appreciated.  Thanks!

        • 1. Re: Trying to execute a batch file that already exists on a local machine
          synsa Specialist

          Hi Rob,

          Sounds like you are just wanting to stage the file before executing.  I have done this before by using managed scripts.  One to copy the file(s) from the server and the second to execute it when required.

           

          If you do want to keep using distribution package (which does allow more control) are you able to post any specifics / script for the batch file being executed without giving away any sensitive info?

          • 2. Re: Trying to execute a batch file that already exists on a local machine
            Rookie

            Hey synsa!

             

            The purpose of the batch file is to silently uninstall IE10 from a user's machine (even if they have an IE session in use) without forcing a restart.  This will revert back to the previously installed version of IE the next time the user manually reboots his/her machine.  Contents of the batch file are as follows:

             

            @echo off

            wusa /uninstall /kb:2718695 /quiet /norestart

             

            Very simple.  It works no problem when I manually double-click from the user's machine.  However, if I try to execute it through a distribution package, it does not run (despite LANDesk reporting a 'Success' on the scheduled task).

            • 3. Re: Trying to execute a batch file that already exists on a local machine
              sterling22 SupportEmployee

              Rob,

               

              What does your second batch file look like and what version of LANDesk are you currently on?  It also sounds like you are creating the second batch file without really needing to.   We can copy the original batch file to the machine and execute it in the same task so you don't have to cache the first batch file then call a second batch file to reference the first for the command execution.  In your current scenairo we are reporting a success against the batch file being used in the distribution task and not against the batch file that you have cached for which the second batch file is referencing and executing.