6 Replies Latest reply on Apr 30, 2010 8:49 AM by elance

    Batch file won't run in the System Configuration portion of provisioning

    Rookie

      Running Landesk 9.

       

      I have a batch file that I run during the System Configuration portion of Provisioning (Post OS installation finishes the OS Config, then reboots, then the batch file is kicked off). .  I had no issues with this in LD 8.7, but now that we're on LD 9 this batch file doesn't seem to run.  I use this batch file for running the setup.exe for a couple of the drivers as the PnP inf's don't include the full functionality.

       

      Nothing earth shattering, just a couple driver installs.

       

      The bat file is copied over in the drivers folder and I have it set as file execution with the path to the bat file, but it doesn't seem to run.  After the system is done and reboots for the final time, the PC comes up and of course the driver wizard is there and waiting.  I can run the bat file after logging in and it runs fine, just can't figure out why it won't kick off during provisioning.

        • 1. Re: Batch file won't run in the System Configuration portion of provisioning
          Apprentice

          Ed,

           

          are you doing an image deployment and have set CTOS as the last (and maybe only) action in Post-OS?

           

          Or are you doing a scripted install, in which case your Post-OS section should be completly empty?

           

           

          bis denn dann

          Carsten

          • 2. Re: Batch file won't run in the System Configuration portion of provisioning
            Rookie

            Here's the steps:

             

             

            Pre-OS installation

                 Map Imaging Tools Drive (ldsmain/osd/imaging)

                 Map Images Drive (this is the share where we keep software and images)

             

            OS installation

                 Ghost Image (ghost to pull image down to PC)

                 Sysprep Injection

                 Configure HAL (vbscript)

                 Driver script (vbscript to detect model type and copy correct drivers)

             

            Post-OS installation

                 OS Configuration

                 Reboot

             

            System Configuration

                 Run Additional Components (this is the bat file that is failing to run)

                 Reboot

             

             

            The bat file is used to load the full video and audio drivers via the setup executables instead of letting PnP pick up the INF's.  I do this because on many of the Dell's there is the issue with High Def Audio Bus driver.  Also, the video driver setup for the onboard video adds the additional functionality for the Intel video settings you don't get with allowing PnP to pick up the drivers.

             

            The bat file also runs one additional executable, which is a program I created using AutoIT.  It's function is to close the driver wizard windows when they open as this prevents the bat from running.  After the driver loads complete, I use a taskkill to stop the AutoIT proggy.

             

            In 8.7 I simply entered the path and file name in the "Target path and file name" box and everything runs fine.  In LD9 we discovered that to get vbscripts to run correctly, for example, we had to enter "wscript" in the target path and file name box, and then the path and script in the command-line parameters box. So, keeping with this slight difference, I have tried various implementations of kicking off the bat file.  Simply entering the path and bat file name in the target path box to entering "call" in the target path box and the path and bat file name in the command-line box, all to no avail.

             

            The paths, drivers, names, etc, etc are all set up nearly identical to how we have 8.7 set up.  Any differences in folders and paths on the share are my doing and I have ensured everything reflects any changes.

             

            The bat file does get copied to the local PC and after the imaging is done, i can log on and just run the bat file and it runs perfectly.  It just will not kick off and run after the OS Config and reboot like it used to do.

            • 3. Re: Batch file won't run in the System Configuration portion of provisioning
              Apprentice

              Looks not bad at all. Please try to delete the Reboot action after "Configure target OS" in the Post-OS-install section - just let CTOS be the *only* action there; CTOS will do a reboot anyway.

               

              BTW: I suppose that (while you are in WinPE) after deploying the image through ghost the target partition is accessible through a drive letter and the deployed image is sysprepped (that's obviously the case for you inject a sysprep.inf)

               

              To be safe you could make  "Run Additional Components" an Execute action with a target path of "C:\Windows\system32\cmd.exe" (without quotes) and the parameter to this "/c <Path-to-your-batch-file>" (also without quotes).

               

              bis denn dann

              Carsten

              • 4. Re: Batch file won't run in the System Configuration portion of provisioning
                Rookie

                Tried your suggestions, but still a no-go.

                 

                I have tested with different models and some work, some don't.

                 

                Age of model doesn't seem to matter.  For example, the older Dell D810 doesn't work, the D620 works perfectly, yet a new E4300 doesn't work.

                 

                I'm at a loss as to why the batch file doesn't work in the cases sited.  In each case, running the batch file after provisioning is done and I log in, they run perfectly.

                 

                I'm going to try vbs to kick off the installs and see how that goes.

                • 5. Re: Batch file won't run in the System Configuration portion of provisioning
                  Rookie

                  Ok, discovered some slight oddities by accident here.

                   

                  I was on an E4300 after provisioning and the driver wizard was up.  If I close that window, after about 30 seconds a command window opens briefly and I can see it registering rptutil.exe, then closes and the bat file finally kicks off and runs.

                   

                  I don't know why it would be registering or trying to do anyhting for MOM reports at that point.

                   

                  I'm going to completely re-do another image from scratch and see what happens.

                  • 6. Re: Batch file won't run in the System Configuration portion of provisioning
                    Rookie

                    Completely rebuilt a new image and ghosted.  No change.  E4300 and D810 will not run the bat file.  Even tried running a vbs instead and it will not kick off.  Everything works perfectly fine when a D620 is provisioned.  After provisioning completes, if I run the bat or the vbs, it runs perfectly fine.