3 Replies Latest reply on Feb 22, 2011 11:54 AM by JaysonDayman

    Agent Install Fails When Called From SYSPREP


      We've noticed a problem recently with Windows XP OSD scripts - not sure exactly when this behavior started but I think we've been seeing it going back at least to LANDesk 8.8. We're currently on LANDesk 9 SP2.


      The problem is that after the OSD script completes and the target computer reboots, SYSPREP.INF should install the LANDesk agent using a command in the [GUIRUNONCE] section. We can see that the Agent installer is launched, but SYSPREP does not wait for the agent installer to finish, it just runs all the rest of the commands in GUIRUNONCE without waiting for the Agent installer. The result is...

      1. The target computer reboots before the agent installer is finished. (We have a reboot command as the last item in [GUIRUNONCE].) We end up with a corrupted or partially installed agent, and the Inventory record for the target computer is not updated.
      2. If we delay the system reboot long enough for the agent installer to finish, we end up with a duplicate record in LANDesk inventory. (I'm pretty sure this happens because one of the [GUIRUNONCE] commands following the Agent installer deletes the "ldiscan.cfg" file that was injected during OS Deployment. When the freshly installed agent sends an Inventory scan it creates a new DeviceID.)


      I found a LANDesk support document that talks about this problem (http://community.landesk.com/support/docs/DOC-2889) but the solution did not help in our case. Does anybody know of a way to make sure the LANDesk agent install is completed before the next [GUIRUNONCE] command is executed?


      FYI - Here is a snippet from our current SYSREP.INF, showing the [GUIRUNONCE] section...


      Command0="c:\ldsleep.exe 30"
      Command1="net use \\DeployServer\deploy$\ldlogon {password} /u:{Domain}\{Account}"
      Command2="cmd /q /c \\DeployServer\deploy$\ldlogon\wscfg32.exe /F /L /STATUS /NOREBOOT"
      Command3="cmd /q /c \\DeployServer\deploy$\packages\PSD70\Desktop\maintenance_desktop.bat"
      Command4="cmd /q /c \\DeployServer\deploy$\imaging\scripts\Schedule_XPP13A_Layer1apps.bat"
      Command5="cmd /q /c c:\ldsleep.exe 900"
      Command6="cmd /q /c del /q c:\ldiscan.cfg"
      Command7="cmd /q /c del /q c:\ldsleep.exe"
      Command8="cmd /q /c shutdown.exe -r -t 360 -f"

        • 1. Re: Agent Install Fails When Called From SYSPREP

          you can try adding Start /wait to your commands.  This tells the command to completly execute before moving on to the next command:


          More info here - http://technet.microsoft.com/en-us/library/cc961065.aspx


          "If you want to control how multiple applications are installed, you can  create a batch file that contains the individual installation commands  and uses the  Start  command with the  /wait command line switch. This method ensures that your applications install  sequentially and that each application is fully installed before the  next application begins its installation routine. The batch file is then  run from the [GuiRunOnce] section."

          1 of 1 people found this helpful
          • 2. Re: Agent Install Fails When Called From SYSPREP

            We had the same exact problem.  As EMiranda was saying, create a batch file and put it in your core server's ldlogon share.  You keep the first two GuiRunOnce commands to sleep and then map to the share, then you call the batch file:


            Command0="c:\ldsleep.exe 30"
            Command1="net use \\LDCORE\ldlogon [password] /u:[username]"


            Then in your batch file do your call to the LANDesk agent installer wscfg32.exe using the "start /wait" command:


            start /wait \\LDCORE\ldlogon\wscfg32.exe /F /L /STATUS /NOREBOOT


            You can also include any other commands in the batch file... for example, we include our antivirus installer as well as run a "gpupdate /force /boot" to make sure the machine has the latest policy settings and reboots once automatically.

            • 3. Re: Agent Install Fails When Called From SYSPREP

              Thanks to both of you for solving my problem! This worked like a champ! I've finally got a reliable way to install the LANDesk Agent, which means I can also install all the other stuff that needs to go on a freshly imaged machine. (We try to keep our OS image as bare as possible - we prefer to install drivers and what we call "Layer 1" software as part of the image deployment. For us, "Layer 1" software includes the anti-virus agent, , Adobe Reader, Microsoft Office, browser plug-ins such as Flash, Shockwave, QuickTime, etc. We use LANDesk HII to install device drivers.)


              OSD has become pretty complex in our environment with quite a few "moving parts", however we like the fact that we can support over 30 different device models, in numerous different labs and offices across 24 different schools, with just one OS image.


              Thanks again for the assistance with LANDesk Agent installs.