<html><head><title>Inventory Computers</title><HTA:APPLICATIONID="objHTAInventory"APPLICATIONNAME="HTA_Inventory"SCROLL="yes"SINGLEINSTANCE="yes"WINDOWSTATE="normal"></head><SCRIPT Language="VBScript">'*******************************************************************************'Script to accept a text file as source of machine names, then create a new' Excel workbook for each computer in the file and save the workbook as the' computer name. Each workbook will contain a sheet for hardware, software,' printers, services, and general information.'Created by Brian Bohanon'Created: 7/7/2008'*******************************************************************************Option Explicit'Global VariablesDim arrFileLines()'array to hold computer namesDim tst'variable for fileDim i, j, k, l'global counters'ObjectsDim objFSO, objFile, objDialog, objExcel, objWMIService, objWorkbookDim objPrintItem, objDiskDrive, objExplorer, objLocalWMIService, objLocalItemDim objOSItem, objBIOS, objSetting, objQuickFix, objSoftware, objServiceDim objDrive, objNet, objProcItem, objSCSIItem, objVideo, objDisk'CollectionsDim colOSItems, colBIOS, colSettings, colQuickFixes, colSoftware, colServicesDim colPrintItems, colDisks, colDiskDrives, colDrives, colNet, colProcItemsDim colSCSIItems, colVideo, colLocalItemsDim WshShell'Provides access to WScript.ShellDim srcFileName'source fileDim intResult'used to test open file dialogDim strComputer'active computer to inventoryDim strDirectory'Local directoryDim strLocalComputer'Local computer script is running onDim intHorizontal, intVertical, intLeft, intTop'ConstantsConst xlLeft = -4131Const xlHorizontal = -4128'*******************************************************************************'Sub routines'*******************************************************************************Sub Window_onLoadSet WshShell = CreateObject("WScript.Shell")strLocalComputer = "."'Set current directory to Desktop & display on pagestrDirectory = WshShell.SpecialFolders("Desktop") & "\"DirectorySpan.innerhtml = "The files will be saved to " & strDirectory
Leave a Comment