Quantcast
Channel: Microsoft Deployment Toolkit forum
Viewing all articles
Browse latest Browse all 11297

Help with custom code in ZTIGather.wsf

$
0
0

To pick up WMI "version" info to deal with Lenovo computer models I found this code and integrated it by adding these lines to ZTIGather.wsf:

ABout line 542:

oEnvironment.Item("LenovoModel") = sLenovoModel

About line 383

'/////////////////////////////////////////
        ' Get the Lenovo Model Version from the Win32_ComputerSystemProduct class
        ' Siva Mulpuru | 10:30 PM Monday, February 14, 2011        
        Set objResults = objWMI.ExecQuery("select * from Win32_ComputerSystemProduct")
        For Each objInstance In objResults
            sLenovoModel = objInstance.Version
        Next
        if sLenovoModel = "" then
            oLogging.CreateEntry "Unable to determine LenovoModel tag via WMI.", LogTypeInfo
        End if
'///////////////////////////////////////////

The code works as intended, and appears to present no problems when imaging from a USB stick, however, when running a standalone image media or trying to launch the wizard from LiteTouch.wsf, the wizard starts and hangs on the initialization step.

If I remove the additional code from ZTIgather.wsf the issue disappears. Looking at the code, does anyone have any ideas?

sd


Viewing all articles
Browse latest Browse all 11297

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>