Hi
I am in the process of writing a script to conmfigure network printers. I have a config.inf file that contains all the setting. The scripts works to the extent of reading the config.inf file and the lines in it. I am trying to get the script to split the line at the ":" and use the rest of the string as a variable to the right of the ":". This is what i have so far.
I am trying to set the WINSSERVER1 Ipaddress variable from the config file.
<------- Script ------->
if isobject(FSO) Then
Set cfgFILE = FSO.Opentextfile("C:\CONFIG.INF")
end If
dim strValue, WINSSERVER1
while not cfgFILE.atendofline
strValue = cfgFILE.readline
If InStr((strValue),"WINSSERVER1") Then
Split(strValue,":")
WINSSERVER1 = XXX.XXX.XXX.XXX -----------------------> This Is the bit i cant Get working
End If
Wend
cfgFILE.close
set FSO=Nothing
set cfgFILE=Nothing
<---------- end script -------------->
Any assistance will be much appreciated..
Many Thanks
I am in the process of writing a script to conmfigure network printers. I have a config.inf file that contains all the setting. The scripts works to the extent of reading the config.inf file and the lines in it. I am trying to get the script to split the line at the ":" and use the rest of the string as a variable to the right of the ":". This is what i have so far.
I am trying to set the WINSSERVER1 Ipaddress variable from the config file.
<------- Script ------->
if isobject(FSO) Then
Set cfgFILE = FSO.Opentextfile("C:\CONFIG.INF")
end If
dim strValue, WINSSERVER1
while not cfgFILE.atendofline
strValue = cfgFILE.readline
If InStr((strValue),"WINSSERVER1") Then
Split(strValue,":")
WINSSERVER1 = XXX.XXX.XXX.XXX -----------------------> This Is the bit i cant Get working
End If
Wend
cfgFILE.close
set FSO=Nothing
set cfgFILE=Nothing
<---------- end script -------------->
Any assistance will be much appreciated..
Many Thanks