11 Replies Latest reply on Jul 4, 2018 4:41 AM by masterpetz

    Problem with if-else in OS deployment

    Schroedi Apprentice

      Hello everyone,

       

      I've got a problem here with OS deployment. As we updated to version 2017-3 this year I decided to clean up our OS templates a little bit. Before the update, we had a single template for desktops and for notebooks with nearly the same settings

      except one or two exceptions.

       

      Now I've build a Windows 10 template with an if-else configuration. I created a variable that looks if the device got a battery or not. It works fine without any problem.

       

      1.jpg

      Sadly it doesn't seem to work with a Windows 7 template. The settings are, in most parts, equal to the Windows 10 template and it has the same if-else configuration.

      2.jpg

      The deployment stops at "Configure Target OS". The Task runs into the error 1163.

      3.jpg

      It think there is a problem with the if-else configuration, but it has the same settings like the Windows 10 one.

      I hope you've got a quick solution for that. Thank you so far.

        • 1. Re: Problem with if-else in OS deployment
          phoffmann SupportEmployee

          Silly question but ... do you HAVE a "Has Battery" value in the inventory record at this time?

           

          Not a case of "working as configured - just missing the relevant data value at this precise point in time" type situation?

          • 2. Re: Problem with if-else in OS deployment
            Schroedi Apprentice

            Yes, this device was allready provisioned some times before.

            1.jpg

            • 3. Re: Problem with if-else in OS deployment
              masterpetz ITSMMVPGroup

              Hi Schroedi,

               

              is this the inventory Screen from the device, that stops at provisioning or is this a a screenshot from a completed provisioned device? From your screenshot I can see, the agent is installed in a step after the domain join so I don't think, you have a full inventory with the correct battery Information. That's what Paul mentioned.

              To troubleshoot, go to your client's "ldprovisioning" folder and check the logs ordered by time. There you should find something if a variable can't be resolved.

               

              Kind regards

              Christian

              • 4. Re: Problem with if-else in OS deployment
                Schroedi Apprentice

                Well, it was provisioned before with a Windows 10 template which completed successfully. Now, with the incomplete Windows 7 provisioning there is no agent installed.

                The last inventory scan is from that time when I ran the Windows 10 template. At this point I don't understand why Windows 10 runs without any problem and Windows 7 runs into an error.

                They have got nearly the same configuration.

                • 5. Re: Problem with if-else in OS deployment
                  masterpetz ITSMMVPGroup

                  Did you check the logfiles? I'm sure you can find something in there...check the logs in "C.\Windows\Temp" and "C:\ldprovisioning".

                  • 6. Re: Problem with if-else in OS deployment
                    Schroedi Apprentice

                    Yes. This is the last process. Seems to be a problem with the if-else action:

                     

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:***********   Processing Condition - If ( Compare Variable )

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Condition is IF

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Processing child Compare Variable.

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Not able to set action as running

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Handling Action - Compare_Variable

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Do EnvironmentCheck

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Is WinPE Action=0, Is WinPe Environment=0

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Session Data: <variables/>

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:In Handle Action.

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:About to download handler.

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Need to download handler:

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Handler remote: /LdLogon/Provisioning/windows/CompareVariableHandler.exe

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Handler local: C:\ldprovisioning\CompareVariableHandler.exe

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Looking for existing file (C:\ldprovisioning\CompareVariableHandler.exe)

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Entering downloadbyproxy.

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Create process (C:\Program Files (x86)\LANDesk\Shared Files\httpclient.exe) with args (  -f "C:\ldprovisioning\CompareVariableHandler.exe" http://XXX.LOCAL/LdLogon/Provisioning/windows/CompareVariableHandler.exe)

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Waiting for process result: 0.

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Process exit code:0

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:The file (C:\ldprovisioning\CompareVariableHandler.exe) was successfully downloaded

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Looking for existing file (C:\ldprovisioning\CompareVariableHandler.sig)

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Entering downloadbyproxy.

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Create process (C:\Program Files (x86)\LANDesk\Shared Files\httpclient.exe) with args (  -f "C:\ldprovisioning\CompareVariableHandler.sig" http://XXX.LOCAL/LdLogon/Provisioning/windows/CompareVariableHandler.sig)

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Waiting for process result: 0.

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Process exit code:-1

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Failed to download (C:\ldprovisioning\CompareVariableHandler.sig)

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Informational: No sig file downloaded.

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Done with download handler.

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Launching action handler [CompareVariableHandler.exe] with parameters ["]

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:handler launched.

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Could not find tag response

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Could not parse status node in xml

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Caught exception in main: code=80001802H, file=..\shared\src\LDProvisionResponse.cpp, line=298

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Call web service GetStatusString()

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Calling Program:C:\Program Files (x86)\LANDesk\Shared Files\httpclient.exe  -b ncs -H"C:\ldprovisioning\header.txt" -o"C:\ldprovisioning\body.txt" -f"C:\ldprovisioning\result.xml" https://XXX.LOCAL/LANDesk/ManagementSuite/Core/ProvisioningWebService/WebService.asmx

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Web service call attempt:0. ExitCode:0

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:StatusString = The action handler output is invalid.

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Call web service SetActionStatus()

                    2018-07-04 06:42:53(2628-2632) ldProvision.exe:Calling Program:C:\Program Files (x86)\LANDesk\Shared Files\httpclient.exe  -b ncs -H"C:\ldprovisioning\header.txt" -o"C:\ldprovisioning\body.txt" -f"C:\ldprovisioning\result.xml" https://XXX.LOCAL/LANDesk/ManagementSuite/Core/ProvisioningWebService/WebService.asmx

                    2018-07-04 06:42:59(2628-2632) ldProvision.exe:Web service call attempt:0. ExitCode:0

                    2018-07-04 06:42:59(2628-2632) ldProvision.exe:Provision GUI still found alive, waiting.

                    2018-07-04 06:43:00(2628-2632) ldProvision.exe:Entering downloadbyproxy.

                    2018-07-04 06:43:00(2628-2632) ldProvision.exe:Create process (C:\Program Files (x86)\LANDesk\Shared Files\httpclient.exe) with args (  -f "ldsleep.exe" http://XXX.LOCAL/landesk/files/ldsleep.exe)

                    2018-07-04 06:43:00(2628-2632) ldProvision.exe:Waiting for process result: 0.

                    2018-07-04 06:43:00(2628-2632) ldProvision.exe:Process exit code:0

                     

                    I don't know if this is important but when the provisioning stops I've got this window (German) on clients screen:

                     

                    1.jpeg

                    • 7. Re: Problem with if-else in OS deployment
                      masterpetz ITSMMVPGroup

                      Then we could switch to deutsch...

                       

                      I have seen this error in some of our customers environments suddenly appear even if really nothing was changed in the template. You can see the exception nearly at the end of the log, I hate this one. I think, your network isn't ready at the moment when the provisioning process tries to download some files from the core. In most cases it helps, when you add a reboot Action with a 100 second timeout as the first action in the system configuration part of the template. Try it and post the results.

                       

                      Hope it helps.

                       

                      Schöne Grüße

                      Christian

                      • 8. Re: Problem with if-else in OS deployment
                        Schroedi Apprentice

                        Wir sollten bei Englisch bleiben, dann hat die Community auch was davon

                         

                        Reboot with 100 seconds delay didn't work. The provisioning stops after the reboot with same issue.

                        3.jpg

                        • 9. Re: Problem with if-else in OS deployment
                          masterpetz ITSMMVPGroup

                          I'm with you...

                          Can you try to change the order, first install the agent, then do the domain join with the variables?

                          And can you check the configuretargetoshandler.log in C:\windows\Temp too, if there are any errors. I think there is no Comparevariablehandler.log in c:\ldprovision because it didn't even start this action, am I right?

                          • 10. Re: Problem with if-else in OS deployment
                            Schroedi Apprentice

                            This seems to work, thank you. Would be nice if you have a short statement why the provisioning works with this changes.

                            • 11. Re: Problem with if-else in OS deployment
                              masterpetz ITSMMVPGroup

                              Hi,

                               

                              the true question here is, why was the Windows 10 template working? You have changed the order now, so the agent will send a full sync to the core as part of the agent installation. Now the variable can compare the values. I have no idea, why Windows 10 can do this without an inventory scan...are you absolutly sure, Windows 10 is working? It would be interesting what the comparevalueshandler.log is saying on the Windows 10 clients...

                               

                              And sometime it even helps when you change something in the template and save it, then revert back to your original configuration and it works. Maybe something gets corrupt in the template.xml, don't know but I have seen this a few times at customers environments. Give it a try, maybe it works now if you move the agent installation to the original position...

                               

                              After all I think your variables return a "null" value because of a missing inventory scan and thats why the compare action can run...that's my guess...

                               

                              Kind regards

                              Christian