4 Replies Latest reply on Apr 23, 2008 1:06 AM by DarrenCarr

    Batch file not installing

    Rookie

       

      I have a batch file that I want to deploy to several machines.

       

       

      The batch file basically copies a DLL and REG key to the local machine.

       

       

      I then use REGSVR32 and REGEDIT to regsiter the service/files on the machine and then quit the batch file.

       

       

      If I run this outside of LANDESK it works. If I attempt to deploy it from LANDESK the batch file never finishes?

       

       

      Any idea what could cause this?

       

       

      Here is the batch file I am using:

       

       

      @ECHO ON

       

       

      :: Created by Darren Carr

      :: 22/04/2008

      :: Batch file copies files to local machine, registers tcorp.dll and appends registry key

      :: The files are part of an Add-In for MS Excel

      :: Used to format charts within MS Excel

       

       

      IF NOT EXIST "C:\Program Files\MacroView" GOTO DoesNot_Exist

      IF EXIST "C:\Program Files\Macroview\tcorp.dll" GOTO Already_Exists

       

       

      :DoesNot_Exist

      MD "C:\Program Files\MacroView"

      COPY
      pc287\install\LANDesk_Pkgs\MacroView\Tcorp.dll "C:\Program Files\MacroView\Tcorp.dll"

      COPY
      pc287\install\LANDesk_Pkgs\MacroView\Tcorp.reg "C:\Program Files\MacroView\Tcorp.reg"

      COPY
      pc287\install\LANDesk_Pkgs\MacroView\TCORPremove.reg "C:\Program Files\MacroView\TCORPremove.reg"

      REGSVR32 /s "C:\Program Files\MacroView\Tcorp.dll"

      REGEDIT /s "C:\Program Files\MacroView\Tcorp.reg"

      exit

       

       

      :Already_Exists

      del "C:\Program Files\Macroview\tcorp.dll"

      COPY /Y
      pc287\install\LANDesk_Pkgs\MacroView\Tcorp.dll "C:\Program Files\MacroView\Tcorp.dll"

      COPY /Y
      pc287\install\LANDesk_Pkgs\MacroView\Tcorp.reg "C:\Program Files\MacroView\Tcorp.reg"

      COPY /Y
      pc287\install\LANDesk_Pkgs\MacroView\TCORPremove.reg "C:\Program Files\MacroView\TCORPremove.reg"

      REGSVR32 /s "C:\Program Files\MacroView\Tcorp.dll"

      REGEDIT /s "C:\Program Files\MacroView\Tcorp.reg"

      exit

       

       

      Thanks

       

       

        • 1. Re: Batch file not installing
          Rookie

           

          I should also add that I am trying to run the batch file from the source, i have permissions to the folder, and I am not copying any of the files down to the machine as additional files as I do not think it is necessary if the batch file is calling them from the source

           

           

          Thanks

           

           

          • 2. Re: Batch file not installing
            Leon SupportEmployee

            I think it's related to the thing 'LANDesk task run as LocalSystem'. This is an account which is different to Administrator and the current logged on user. That's why it ran successfully outside LANDesk, basically it ran as the current logged on user. In 8.8 you can specify run as LocalSystem or Current user's account in the distribution package. For 8.7 there is a tool which also can do this. See this document:

            http://community.landesk.com/support/docs/DOC-1575

            • 3. Re: Batch file not installing
              Rookie

               

              Hi,

               

               

              Thanks for the response.

               

               

              The problem I have is that I need to run the batch file with SYSTEM rights as the logged in user does not have write access to C:\Program Files\MacroView

               

               

              It would appear that the copying of the files is working to the client but that the batch file is not being executed?

               

               

              If I run the batch file from the cache on the PC it works?

               

               

              I am using the same PC as for the testing as I used for when I ran from the UNC share with the same logged in user?

               

               

              • 4. Re: Batch file not installing
                Rookie

                 

                 

                 

                 

                The issue was a local PC issue. I tried on several other machines and it deployed successfully.

                 

                 

                The error log on the client was just not very descriptive!

                 

                 

                Cheers