I need to setup a script to pull the computer name from a .txt file then check the workstation type and install the appropriate updated NIC drivers for each workstation. I currently have Dell GX150, GX260, GX270, GX280, GX 620 and GX745 workstations in my environment... I found a script that I am still trying to modify to examine the workstation model and then install the update seamlessly on the workstation. I am very new to scripting so any help would be much appreciated.
Here is what I have, I know I have a long way to go with this one...
Option Explicit
Dim objShell, objDictionary, objFSO, objTextFile, i, strNextLine, objItem
Const ForReading = 1
Set objDictionary = CreateObject("Scripting.Dictionary")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("H:\scriptlogs\GX260\machines.txt", ForReading)
i = 0
Do Until objTextFile.AtEndOfStream
strNextLine = objTextFile.Readline
objDictionary.Add i, strNextLine
i = i + 1
Loop
For Each objItem in objDictionary
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "H:\Drivers\GX260nicdrivers\dellnic.exe",7,True
Next
Here is what I have, I know I have a long way to go with this one...
Option Explicit
Dim objShell, objDictionary, objFSO, objTextFile, i, strNextLine, objItem
Const ForReading = 1
Set objDictionary = CreateObject("Scripting.Dictionary")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("H:\scriptlogs\GX260\machines.txt", ForReading)
i = 0
Do Until objTextFile.AtEndOfStream
strNextLine = objTextFile.Readline
objDictionary.Add i, strNextLine
i = i + 1
Loop
For Each objItem in objDictionary
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "H:\Drivers\GX260nicdrivers\dellnic.exe",7,True
Next