HP DesignJet T3500 System Administrator s Guide - Page 35
For Each aItem In objDir.Files
View all HP DesignJet T3500 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 35 highlights
end function This function recovers information from Driver instalation path ' Input Params: ' - path: The Path of the instalation files ' Output Parms: ' - infFile: The INF full path file function GetInfFile(path,platform,configDriverSubfolder,infFile) Dim FSO, objDir, aItem, found, subpath Dim WshShell found = false if path "" then path = path + "\" else Set WshShell = WScript.CreateObject("WScript.Shell") path = wshshell.currentdirectory + "\" + configDriverSubfolder + "\" end if Set FSO = CreateObject("Scripting.FileSystemObject") if Not FSO.FolderExists(path) then wscript.echo "Folder does not exist" wscript.echo "Installation not done" wscript.quit(1) end if Set objDir = FSO.GetFolder(path) For Each aItem In objDir.Files If LCase(Right(Cstr(aItem.Name), 3)) = "inf" Then infFile = path + aItem.Name found = true exit for end if Next if found = false then ' path does not contain inf. Let's add x86 and x64 subfolders if platform = "x86" then subpath = path + "win2k_xp_vista\" else subpath = path + "winxp_vista_x64\" end if if Not FSO.FolderExists(subpath) then wscript.echo "No inf found either in " + path + " or in " + subpath wscript.echo "Installation not done" wscript.quit(1) end if Set objDir = FSO.GetFolder(subpath) For Each aItem In objDir.Files If LCase(Right(Cstr(aItem.Name), 3)) = "inf" Then 35 HP DJ UPD SAG