3 Replies Latest reply on Jun 24, 2011 9:57 PM by Jared Barneck

    LD V9 SP 2 BatchFile not executing

    Rookie

      Hi Good Morning Guys,

       

           Maybe you can help me with my issue, I have create a Batchfile distribution package, and scheduled a task, batchfile was downloaded on the client but it does not execute. it remains on sdmcache\installer\batch file\. here is the server client logs and the sample batch file.

       

          

          

       

      Batchfile

      net use x: "\\172.16.80.95\installer\SAP Update"
      copy x:\saplogon.ini "C:\Windows\"
      copy x:\services "C:\Windows\system32\drivers\etc\"
      net use x: /delete

       

       

      Logs

      Processing package : SAP Update Files
      Fri, 24 Jun 2011 18:33:22 File (
      http://172.16.80.95/installer/Batch File/SAP update.bat) is cached locally
      Fri, 24 Jun 2011 18:33:24 ILdDownloading file to C:\Program Files\LANDesk\LDClient\sdmcache\ldlogon\FileLists\taskmanifest.PHSROA76.155.31.ini, attempt 0
      Fri, 24 Jun 2011 18:33:25 ILdDownloadFile returned 0
      Fri, 24 Jun 2011 18:33:25

      Downloading file http://172.16.80.95/installer/Batch File/SAP update.bat (toCgoVltcADkDiqHL+U1kA==, 3)
      Fri, 24 Jun 2011 18:33:25 Downloading file 1 of 1 from 'http://172.16.80.95/installer/Batch File/SAP update.bat'
      Fri, 24 Jun 2011 18:33:25 processing of package is complete, result 229392397 (0x0dac400d - code 16397)

      Fri, 24 Jun 2011 18:33:26 File (http://172.16.80.95/installer/Batch File/SAP update.bat) is cached locally
      Fri, 24 Jun 2011 18:33:26 ILdDownloading file to C:\Program Files\LANDesk\LDClient\sdmcache\ldlogon\FileLists\taskmanifest.PHSROA76.155.31.ini, attempt 0
      Fri, 24 Jun 2011 18:33:27 ILdDownloadFile returned 0
      Fri, 24 Jun 2011 18:33:27

      Downloading file http://172.16.80.95/installer/Batch File/SAP update.bat (toCgoVltcADkDiqHL+U1kA==, 3)
      Fri, 24 Jun 2011 18:33:27 Downloading file 1 of 1 from 'http://172.16.80.95/installer/Batch File/SAP update.bat'
      Fri, 24 Jun 2011 18:33:27 Batch file Client Thread
      Fri, 24 Jun 2011 18:33:27 PackagePath:  [http://172.16.80.95/installer/Batch File/SAP update.bat]

      Fri, 24 Jun 2011 18:43:56 FlushClientTaskQueue: queue is empty

       

       

       

      Thanks,

      Joe

        • 1. Re: LD V9 SP 2 BatchFile not executing
          derekhamaker Apprentice

          Hey Joe -

          try dumping the net use commands and just copy the saplogon.ini file directrly off your share.

          I also would use xcopy with /Y /Z switches on the end.

           

          Are you running this task as local system account or local user?

           

          Does the account have access to that share?

           

          If you run the batch manually, does it work correctly?

           

          -Derek

          • 2. Re: LD V9 SP 2 BatchFile not executing
            Jared Barneck SupportEmployee

            You may be doing this the hard way because:

             

            1. net use is sort of annoying in batch files...

            2. Does it run as the user or as local system? Which did you choose?

            3. Do you have proper permissions to the network share?

             

            Also, you should always provide switches to make the command silent...if the file already exists, you are going to have a hung batch file because it is running silently but yet the copy command is waiting for a user to say yes to overwrite, but a user can't say yes to overwrite because they can't see the window.

             

            Seems like it would make more sense to do it this way but of course you may have a reason to do the net use commands but if not....

             

            1. Change the batch file to simply be these two lines:

              copy /Y saplogon.ini "C:\Windows\"
              copy /Y services "C:\Windows\system32\drivers\etc\"
            2. Put the batch file in the exact same folder as the files:
              \\172.16.80.95\installer\SAP
              Update share.
            3. Create a batch file distribution package.
            4. Include the two files as Additional files in the distribution package:
              \\172.16.80.95\installer\SAP Update\Saplogin.ini
              \\172.16.80.95\installer\SAP Update\Services
            5. Now push your distribution package.
            • 3. Re: LD V9 SP 2 BatchFile not executing
              Jared Barneck SupportEmployee

              Oh, by the way...

               

              You should also use the %WINDIR% environment variable instead of C:\windows.

               

              copy /Y saplogon.ini "%WINDIR%\"
              copy /Y services "
              %WINDIR%\system32\drivers\etc\"

               

              Because you never know if some device is installed to a drive other than C or for some reason the Windows directory is named something else.