none
CheckModel windows script not working. RRS feed

  • Question

  • I stumbled across J. Gregs blog with a post about using a custom script to automate driver installs.

    http://blog.uvm.edu/jgm/2013/11/06/rethinking-drivers-mdt-2013/

    Followed his instructions, but my task sequence failed:

    "Failed to run the action: Supported Model Check"

    This step runs the command "%SCRIPTROOT%\ZUVMCheckModel.wsf"

    This is the script:

    ' Uncomment and wrap each of the following three lines in less than/greater than characters to convert them to tags.
    <job id="ZUVMCheckModel">
    <script language="VBScript" src="ZTIUtility.vbs"/>
    <script language="VBScript">
    
    Option Explicit
    RunNewInstance
    
    '//--------------------------------------------------------
    '// Main Class
    '//--------------------------------------------------------
    Class ZUVMCheckModel
    	
    	'//—————————————————————————-
    	'//  Constructor to initialize needed global objects
    	'//—————————————————————————-
    	Private Sub Class_Initialize
    	End Sub
    	
    	'//--------------------------------------------------------
    	'// Main routine
    	'//--------------------------------------------------------
    
    	Function Main()
    	' //*******************************************************
    	' //
    	' // File: ZTIUVMCheckModel.wsf
    	' //
    	' // Purpose: Checks the model of this system against
    	' //          a list of known machine models.  Returns
    	' //          TRUE if a matching model is detected.
    	' //
    	' // Usage: cscript ZUVMCheckModel.wsf /Model: [/debug:true]
    	' //
    	' //*******************************************************
    	
    	'Use the following lines for debugging only.
    	'oEnvironment.Item("TargetOS") = "Win7"
    	'oEnvironment.item("DeployRoot") = "c:\local\mdt"
    	'oEnvironment.Item("Model") = "Latitude E6500 some annoying variation"
    	'End debug Params
    
    	  Dim aModels()          'Array of models taken from DriverGroups.xml
    	  Dim bOldDrivers        'Boolean indicating drivers present for an older OS version
    	  Dim i                  'Generic integer for looping
    	  Dim j                  'Generic integer for looping
    	  Dim iRetVal            'Return code variable
    	  Dim iMaxOS             'Integer representing the highest matching OS driver store
    	  Dim oRegEx
    	  Dim oMatch
    	  Dim match
    	  Dim oXMLDoc            'XML Document Object, for reading DriverGroups.xml
    	  Dim Root,NodeList,Elem 'Objects in support of oXMLdoc
    	  Dim sDGPath            'Path to DriverGroups.xml file
    	  Dim sInitModel         'String representing the initial value of
    	                         '   oEnvironment.Item("Model")
    	  Dim sItem	             'Item in aModels array.
    	  Dim sMaxOS             'OS Name of highest matching OS driver store
    	  Dim sOSFound           'OS Name for a given matching driver set.
    	  
    	  oLogging.CreateEntry "Begin ZUVMCheckModel...", LogTypeInfo
    	  
    	  'Set the default values:
    	  oEnvironment.Item("SupportedModel") = "NO"
    	  iMaxOS = CInt(Right(oEnvironment.Item("TargetOS"),1))
    	  'wscript.echo "Default value for iMaxOS = " & iMaxOS
    	  bOldDrivers = false
    	  sInitModel = oEnvironment.Item("Model")
    	  'wscript.echo "sInitModel value = " & sInitModel
    	  
    	  Set oRegEx = New RegExp
    	  oRegEx.Global = True
    	  oRegEx.IgnoreCase = True
    	  
    	  'Modify the detected model name to handle known variations:
    	  oRegEx.pattern = "Latitude"
    	  if oRegEx.test(sInitModel) then
    		oLogging.CreateEntry "Model is a Latitude.  Cleaning up the model name...", LogTypeInfo
    		oRegEx.pattern = " "
    		set oMatch = oRegEx.Execute(sInitModel)
    		'wscript.echo "oMatch Count is: " & oMatch.count
    		if oMatch.Count > 1 then
    			i = oMatch.item(1).FirstIndex
    			oEnvironment.Item("Model") = Left(sInitModel,i)
    			'wscript.echo """"&oEnvironment.Item("Model")&""""
    		end if
    	  end if
    
    	  'Check for DriverGroups.xml file, which will contain the supported model list:
    	  iRetVal = Failure
    	  iRetVal = oUtility.FindFile("DriverGroups.xml", sDGPath)
    	  if iRetVal  Success then
    		oLogging.CreateEntry "DriverGroups file not found. ", LogTypeError
    		exit function
    	  end if 
    	  oLogging.CreateEntry "Path to DriverGroups.xml: " & sDGPath, LogTypeInfo
    	  
    	  'Parse the DriverGroups.xml file:
    	  oLogging.CreateEntry "Parsing DriverGroups.xml...", LogTypeInfo
    	  Set oXMLDoc = CreateObject("Msxml2.DOMDocument") 
    	  oXMLDoc.setProperty "SelectionLanguage", "XPath"
    	  oXMLDoc.load(sDGPath)
    	  Set Root = oXMLDoc.documentElement 
    	  Set NodeList = Root.getElementsByTagName("Name")
    	  oLogging.CreateEntry "NodeList Member Count is: " & NodeList.length, LogTypeInfo
    	  'oLogging.CreateEntry "NodeList.Length variant type is: " & TypeName(NodeList.Length), LogTypeInfo
    	  i = CInt(NodeList.length) - 1
    	  ReDim aModels(i) 'Resize aModels to hold all matching DriverGroup items.
    	  'oLogging.CreateEntry "List of Available Driver Groups:", LogTypeInfo
    	  i = 0
    	  For Each Elem In NodeList
    		if InStr(Elem.Text,"Models\") then
    			aModels(i) = Mid(Elem.Text,8)	'Add text after "Models\"
    			'oLogging.CreateEntry aModels(i), LogTypeInfo
    			i = i + 1
    		end if
    	  Next
    	  oLogging.CreateEntry "End Parsing DriverGroups.xml.", LogTypeInfo
    
    	  'Loop through the list of supported models to find a match:
    	  oLogging.CreateEntry "Checking discovered driver groups for match to: " & oenvironment.Item("Model"), LogTypeInfo
    	  For Each sItem in aModels
    		oLogging.CreateEntry "Checking Driver Group: " & sItem, LogTypeInfo
    		i = InStr(1, sItem, oEnvironment.Item("Model"), vbTextCompare)
    
    		'wscript.echo TypeName(i) 'i is a "Long" number type.
    		If i  0 Then
    			oLogging.CreateEntry "Matching Model found.", LogTypeInfo
    			
    			j = InStr(sItem,"\")
    			sOSFound = Left(sItem,j-1)
    			'wscript.echo "sOSFound = " & sOSFound 
    			if (InStr(1,sOSFound,oEnvironment.Item("TargetOS"),vbTextCompare)  0) then
    				oLogging.CreateEntry "Drivers matching the requested OS are available.  Exiting with success.", LogTypeInfo
    				oEnvironment.Item("SupportedModel") = "YES"
    				iRetVal = Success
    				Main = iRetVal
    				Exit Function
    			end if
    			if iMaxOS > CInt(Right(sOSFound,1)) then
    				iMaxOS = CInt(Right(sOSFound,1))
    				'wscript.echo "iMaxOS = " & iMaxOS
    				sMaxOS = sOSFound
    				bOldDrivers = true
    				'wscript.echo "sMaxOS = " & sMaxOS
    			end if
    		End If
    	  Next
    		
    	  If bOldDrivers Then 'Run if sMaxOS is defined... set a boolean when this is defined and test against that?
    		oLogging.CreateEntry "Model drivers were found for an OS older than the one selected...", LogTypeWarning
    		oEnvironment.Item("SupportedModel") = "YES"
    		oEnvironment.Item("TargetOS") = sMaxOS
    	  Else
    	    oLogging.CreateEntry "No matching drivers were found for this model.", LogTypeInfo
    	  End If
    	  
    	  oLogging.CreateEntry "End ZUVMCheckModel.", LogTypeInfo
    
    	  iRetVal = Success
    	  Main = iRetVal
    
    	End Function
    
    End Class
    
    ' Uncomment and wrap each of the following two lines in less than/greater than characters to convert them to tags.
    </script>
    </job>
    
    
    

    So I tried to run the script from command line, from the deployment share:

    Using: cscript ZTICheckModel.wsf /Model: [/debug:true]

    No mater how I modify the way I call or append the command, I always get:

    ZUVMCheckModel.wsf(92, 17) Microsoft VBScript compilation error: Expected 'Then'

    I think is the part of the script that is looking for drivergroups.xml.  I confirmed it was in the control folder, and even copied it into the scripts folder thinking it wasn't find the path.  Still no luck.

    Anyone used this or familiar enough with scripting to know where I've gone wrong?

    Thanks,

    -Matt


    There's no place like 127.0.0.1

    Thursday, June 5, 2014 11:06 PM

All replies

  • Change line 92 to:

    	  if iRetVal = Success then

    Friday, June 6, 2014 10:53 AM
  • Thanks! Turns out it was missing a "=" from lines 128 and 134 as well.  I think word press did more damage to that script than he thought.

    Now when I run it in debugging mode I get this:

    Z:\Scripts>cscript ZUVMCheckModel.wsf /Model: /debug:true
    Microsoft (R) Windows Script Host Version 5.8
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    Property Model is now =
    'debug' parameter was specified.
    Property debug is now = TRUE
    Microsoft Deployment Toolkit version: 6.2.5019.0
    SUCCESS: 0: Create object: Set oScriptClass = New ZUVMCheckModel
    Property TargetOS is now = Win7x64
    Property DeployRoot is now = Z:
    Property Model is now = Latitude E6500 some annoying variation
    Begin ZUVMCheckModel...
    Property SupportedModel is now = NO
    Model is a Latitude.  Cleaning up the model name...
    Property Model is now = Latitude E6500
    DriverGroups file not found.
    ZUVMCheckModel processing completed successfully.

    I've verified it's in the default location of .\DeploymentShare$\Control

    I see in the script portion where it searches for, and sets "sDGPath" starting at line 89.  But I'm not sure how to check and see why it's failing.  Maybe another missing character?


    There's no place like 127.0.0.1


    • Edited by Matt5150 Friday, June 6, 2014 8:52 PM more info
    Friday, June 6, 2014 6:07 PM
  • I changed line 92, replacing the = with a <> to read:

    if iRetVal <> Success then

    Now the result is:

    Property MODEL is now =
    'debug' parameter was specified.
    Property debug is now = TRUE
    Microsoft Deployment Toolkit version: 6.2.5019.0
    SUCCESS: 0: Create object: Set oScriptClass = New ZUVMCheckModel
    Property TargetOS is now = Win7x64
    Property DeployRoot is now = \\server\deploymentshare$
    Property Model is now = Latitude E6500 some annoying variation
    Begin ZUVMCheckModel...
    Property SupportedModel is now = NO
    Model is a Latitude.  Cleaning up the model name...
    Property Model is now = Latitude E6500
    Path to DriverGroups.xml: \\server\deploymentshare$\Control\DriverGroups.x
    ml
    Parsing DriverGroups.xml...
    NodeList Member Count is: 41
    End Parsing DriverGroups.xml.
    Checking discovered driver groups for match to: Latitude E6500
    Checking Driver Group:
    Matching Model found.
    ZTI ERROR - Unhandled error returned by ZUVMCheckModel: Invalid procedure call o
    r argument (5)

    Bouncing around changing = to <> and back I was able to get a little farther, but always ending with that ZTI Error.


    There's no place like 127.0.0.1

    Friday, June 6, 2014 10:05 PM
  • When running any script in a debugging environment, best to remember two things:

    1. for test parameters, any command line argument will *automatically* be converted into the MDT key value pair name space. So for example rather than hard coding this into your code:

    	'oEnvironment.Item("TargetOS") = "Win7"
    	'oEnvironment.item("DeployRoot") = "c:\local\mdt"
    	'oEnvironment.Item("Model") = "Latitude E6500 some annoying variation"
    

    you could do this:

    cscript ZUVMCheckModel.wsf /TargetOS:win7 /DeployRoot:c:\DeploymentShare /Model:"Latitude E6500 some annoying"

    2. During test development, always run with the command line arguments "/Debug:true /DebugCapture". these parameters will ensure that the script is run in debugging mode and display with the line number and more detailed debugging information when the script crashes.


    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com

    Monday, June 9, 2014 6:12 PM
    Moderator
  • I must have deleted that REM when pasting.  It's present in the script I'm testing.

    The full error from MDT is:

    "Supported Model Check. Incorrect function. (Error: 000001; Source: Windows)"

    I'm testing from command line using this script.  Starting with the original script from above from a command line I get the following.

    'Result
    D:\Deploy>cscript /nologo scripts\ZUVMCheckModel2.wsf /MODEL:"Latitude E6410 and stuff" /debug:true
    D:\Deploy\scripts\ZUVMCheckModel2.wsf(92, 17) Microsoft VBScript compilation error: Expected 'Then'
    
    	'Changed line 92 to: if iRetVal = Success then
    
    'Result
    D:\Deploy>cscript /nologo scripts\ZUVMCheckModel2.wsf /MODEL:"Latitude E6410 and stuff" /debug:true
    D:\Deploy\scripts\ZUVMCheckModel2.wsf(127, 10) Microsoft VBScript compilation error: Expected 'Then'
    
    	'Changed line 127 to: If i <> 0 Then
    
    'Result
    D:\Deploy>cscript /nologo scripts\ZUVMCheckModel2.wsf /MODEL:"Latitude E6410 and stuff" /debug:true
    D:\Deploy\scripts\ZUVMCheckModel2.wsf(133, 72) Microsoft VBScript compilation error: Expected ')'
    
    	'Changed line 133 to: if (InStr(1,sOSFound,oEnvironment.Item("TargetOS"),vbTextCompare) <> 0) then
    
    'Result
    D:\Deploy>cscript /nologo scripts\ZUVMCheckModel2.wsf /MODEL:"Latitude E6410 and stuff" /debug:true
    Property MODEL is now = Latitude E6410 and stuff'debug' parameter was specified.
    Property debug is now = TRUE
    Property DebugCapture is now =
    Microsoft Deployment Toolkit version: 6.2.5019.0
    SUCCESS: 0: Create object: Set oScriptClass = New ZUVMCheckModel2
    Begin ZUVMCheckModel2...
    Property SupportedModel is now = NO
    Model is a Latitude.  Cleaning up the model name...
    Property Model is now = Latitude E6410
    DriverGroups file not found.
    ZUVMCheckModel2 processing completed successfully.
    
    	'Ok so back to line 92, and change to:  if iRetVal <> Success then
    
    'Result
    D:\Deploy>cscript /nologo scripts\ZUVMCheckModel2.wsf /MODEL:"Latitude E6410 and stuff" /debug:true
    Property MODEL is now = Latitude E6410 and stuff
    'debug' parameter was specified.
    Property debug is now = TRUE
    Microsoft Deployment Toolkit version: 6.2.5019.0
    SUCCESS: 0: Create object: Set oScriptClass = New ZUVMCheckModel2
    Begin ZUVMCheckModel2...
    Property SupportedModel is now = NO
    Model is a Latitude.  Cleaning up the model name...
    Property Model is now = Latitude E6410
    Path to DriverGroups.xml: \\wkpv1infaa11.cbsh.com\deploy$\Control\DriverGroups.xml
    Parsing DriverGroups.xml...
    NodeList Member Count is: 45
    End Parsing DriverGroups.xml.
    Checking discovered driver groups for match to: Latitude E6410
    Checking Driver Group: Latitude E6410
    Matching Model found.
    ZTI ERROR - Unhandled error returned by ZUVMCheckModel2: Invalid procedure call or argument (5)
    
    	'Running with /debugcapture 1 >> c:\log\log.log
    
    D:\Deploy>cscript /nologo scripts\ZUVMCheckModel2.wsf /MODEL:"Latitude E6410 and stuff" /TargetOS:"Win7x64" /debug:true /DebugCapture 1 >>c:\log\log.log
    D:\Deploy\scripts\ZUVMCheckModel2.wsf(131, 5) Microsoft VBScript runtime error: Invalid procedure call or argument: 'Left'

    And that's where I hit the wall.  I get there is a problem with the script line (131, 5), maybe with 130.

       j = InStr(sItem,"\")
       sOSFound = Left(sItem, j-1)

    But I can't seem to figure out what is garbled with it.  I think line 130 is creating "j" with a null or invalid value, causing line 131 to throw the error when "j-1" is called.  I can't piece out the logic in line 130 though.


    There's no place like 127.0.0.1

    Monday, June 9, 2014 8:15 PM
  • And that's where I hit the wall.  I get there is a problem with the script line (131, 5), maybe with 130.

       j = InStr(sItem,"\")
       sOSFound = Left(sItem, j-1)

    But I can't seem to figure out what is garbled with it.  I think line 130 is creating "j" with a null or invalid value, causing line 131 to throw the error when "j-1" is called.  I can't piece out the logic in line 130 though.


    Yes, most likely, you are enumerating through all instances of the directories, and found one that did *not* contain a trailing "\" , this returning zero in "j", and an error when calling Left. Best to verify that instr actually returned a correct value before continuing.

    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com

    Tuesday, June 10, 2014 5:04 AM
    Moderator
  • Sorry it's taken me so long to get back to this.

    I think I have the script "fixed" but it's not working and I'm not sure why.

    It should be enumerating through the DriverGroups.xml file located at .\MDT\Control, but the script can't seem to find the XML file.

    <job id="ZUVMCheckModel">
    <script language="VBScript" src="ZTIUtility.vbs"/>
    <script language="VBScript">
    
    Option Explicit
    RunNewInstance
    
    '//--------------------------------------------------------
    '// Main Class
    '//--------------------------------------------------------
    Class ZUVMCheckModel
    	
    	'//—————————————————————————-
    	'//  Constructor to initialize needed global objects
    	'//—————————————————————————-
    	Private Sub Class_Initialize
    	End Sub
    	
    	'//--------------------------------------------------------
    	'// Main routine
    	'//--------------------------------------------------------
    
    	Function Main()
    	' //*******************************************************
    	' //
    	' // File: ZTIUVMCheckModel.wsf
    	' //
    	' // Purpose: Checks the model of this system against
    	' //          a list of known machine models.  Returns
    	' //          TRUE if a matching model is detected.
    	' //
    	' // Usage: cscript ZUVMCheckModel.wsf /Model: [/debug:true]
    	' //
    	' //*******************************************************
    	
    	'Use the following lines for debugging only.
    	'oEnvironment.Item("TargetOS") = "Win7"
    	'oEnvironment.item("DeployRoot") = "C:\MDT\control"
    	'oEnvironment.Item("Model") = "Latitude E6500 some annoying variation"
    	'End debug Params
    
    	  Dim aModels()          'Array of models taken from DriverGroups.xml
    	  Dim bOldDrivers        'Boolean indicating drivers present for an older OS version
    	  Dim i                  'Generic integer for looping
    	  Dim j                  'Generic integer for looping
    	  Dim iRetVal            'Return code variable
    	  Dim iMaxOS             'Integer representing the highest matching OS driver store
    	  Dim oRegEx
    	  Dim oMatch
    	  Dim match
    	  Dim oXMLDoc            'XML Document Object, for reading DriverGroups.xml
    	  Dim Root,NodeList,Elem 'Objects in support of oXMLdoc
    	  Dim sDGPath            'Path to DriverGroups.xml file
    	  Dim sInitModel         'String representing the initial value of
    	                         '   oEnvironment.Item("Model")
    	  Dim sItem	             'Item in aModels array.
    	  Dim sMaxOS             'OS Name of highest matching OS driver store
    	  Dim sOSFound           'OS Name for a given matching driver set.
    	  
    	  oLogging.CreateEntry "Begin ZUVMCheckModel...", LogTypeInfo
    	  
    	  'Set the default values:
    	  oEnvironment.Item("SupportedModel") = "NO"
    	  iMaxOS = CInt(Right(oEnvironment.Item("TargetOS"),1))
    	  'wscript.echo "Default value for iMaxOS = " & iMaxOS
    	  bOldDrivers = false
    	  sInitModel = oEnvironment.Item("Model")
    	  'wscript.echo "sInitModel value = " & sInitModel
    	  
    	  Set oRegEx = New RegExp
    	  oRegEx.Global = True
    	  oRegEx.IgnoreCase = True
    	  
    	  'Modify the detected model name to handle known variations:
    	  oRegEx.pattern = "Latitude"
    	  if oRegEx.test(sInitModel) then
    		oLogging.CreateEntry "Model is a Latitude.  Cleaning up the model name...", LogTypeInfo
    		oRegEx.pattern = " "
    		set oMatch = oRegEx.Execute(sInitModel)
    		'wscript.echo "oMatch Count is: " & oMatch.count
    		if oMatch.Count > 1 then
    			i = oMatch.item(1).FirstIndex
    			oEnvironment.Item("Model") = Left(sInitModel,i)
    			'wscript.echo """"&oEnvironment.Item("Model")&""""
    		end if
    	  end if
    
    	  'Check for DriverGroups.xml file, which will contain the supported model list:
    	  iRetVal = Failure
    	  iRetVal = oUtility.FindFile("DriverGroups.xml", sDGPath)
    	  if iRetVal = Success then
    		oLogging.CreateEntry "DriverGroups file not found. ", LogTypeError
    		exit function
    	  end if 
    	  oLogging.CreateEntry "Path to DriverGroups.xml: " & sDGPath, LogTypeInfo
    	  
    	  'Parse the DriverGroups.xml file:
    	  oLogging.CreateEntry "Parsing DriverGroups.xml...", LogTypeInfo
    	  Set oXMLDoc = CreateObject("Msxml2.DOMDocument") 
    	  oXMLDoc.setProperty "SelectionLanguage", "XPath"
    	  oXMLDoc.load(sDGPath)
    	  Set Root = oXMLDoc.documentElement 
    	  Set NodeList = Root.getElementsByTagName("Name")
    	  oLogging.CreateEntry "NodeList Member Count is: " & NodeList.length, LogTypeInfo
    	  'oLogging.CreateEntry "NodeList.Length variant type is: " & TypeName(NodeList.Length), LogTypeInfo
    	  i = CInt(NodeList.length) - 1
    	  ReDim aModels(i) 'Resize aModels to hold all matching DriverGroup items.
    	  'oLogging.CreateEntry "List of Available Driver Groups:", LogTypeInfo
    	  i = 0
    	  For Each Elem In NodeList
    		if InStr(Elem.Text,"1_PROD\") then
    			aModels(i) = Mid(Elem.Text,8)	'Add text after "1_PROD\"
    			'oLogging.CreateEntry aModels(i), LogTypeInfo
    			i = i + 1
    		end if
    	  Next
    	  oLogging.CreateEntry "End Parsing DriverGroups.xml.", LogTypeInfo
    
    	  'Loop through the list of supported models to find a match:
    	  oLogging.CreateEntry "Checking discovered driver groups for match to: " & oenvironment.Item("Model"), LogTypeInfo
    	  For Each sItem in aModels
    		oLogging.CreateEntry "Checking Driver Group: " & sItem, LogTypeInfo
    		i = InStr(1, sItem, oEnvironment.Item("Model"), vbTextCompare)
    
    		'wscript.echo TypeName(i) 'i is a "Long" number type.
    		If i <> 0 Then
    			oLogging.CreateEntry "Matching Model found.", LogTypeInfo
    			
    			j = InStr(sItem,"\")
    			sOSFound = Left(sItem,j-1)
    			'wscript.echo "sOSFound = " & sOSFound 
    			if (InStr(1,sOSFound,oEnvironment.Item("TargetOS"),vbTextCompare) <> 0) then
    				oLogging.CreateEntry "Drivers matching the requested OS are available.  Exiting with success.", LogTypeInfo
    				oEnvironment.Item("SupportedModel") = "YES"
    				iRetVal = Success
    				Main = iRetVal
    				Exit Function
    			end if
    			if iMaxOS > CInt(Right(sOSFound,1)) then
    				iMaxOS = CInt(Right(sOSFound,1))
    				'wscript.echo "iMaxOS = " & iMaxOS
    				sMaxOS = sOSFound
    				bOldDrivers = true
    				'wscript.echo "sMaxOS = " & sMaxOS
    			end if
    		End If
    	  Next
    		
    	  If bOldDrivers Then 'Run if sMaxOS is defined... set a boolean when this is defined and test against that?
    		oLogging.CreateEntry "Model drivers were found for an OS older than the one selected...", LogTypeWarning
    		oEnvironment.Item("SupportedModel") = "YES"
    		oEnvironment.Item("TargetOS") = sMaxOS
    	  Else
    	    oLogging.CreateEntry "No matching drivers were found for this model.", LogTypeInfo
    	  End If
    	  
    	  oLogging.CreateEntry "End ZUVMCheckModel.", LogTypeInfo
    
    	  iRetVal = Success
    	  Main = iRetVal
    
    	End Function
    
    End Class
    
    </script>
    </job>


    If I run it with debug, it results as this:

    C:\PowerShell>cscript c:\mdt\scripts\ZUVMCheckModel.wsf /Model: [/debug:true]
    Microsoft (R) Windows Script Host Version 5.8
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    Property Model is now =
    Microsoft Deployment Toolkit version: 6.2.5019.0
    SUCCESS: 0: Create object: Set oScriptClass = New ZUVMCheckModel
    Begin ZUVMCheckModel...
    Property SupportedModel is now = NO
    DriverGroups file not found.
    ZUVMCheckModel processing completed successfully.

    Not sure if one of the <> or = I added back on one of those garbled lines is incorrect, or there is a line that is still missing characters.

    I see on line 90 where sDGPath is supposed to be defined by oUtility.FindFile, but I'm not finding any problem with this line.


    • Edited by Matt5150 Thursday, February 12, 2015 9:05 PM Edit
    Thursday, February 12, 2015 8:55 PM