Page 2 of 3 <123>
Topic Options
#155978 - 2006-01-26 03:10 AM Re: Problems with calling array elements in strings...
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
Here - try this version.

Break On
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('NoMacrosInStrings','On')

Dim $sComputers,$sComputer,$Details,$Detail
Dim $Alive,$WMIOkay
$sComputers = ReadFile(@ScriptDir+'\'+'computer_list.txt')
For Each $sComputer In $sComputers
If $sComputer
$Alive = Ping($sComputer)
If $Alive
$WMIOkay = ConfirmWMI($sComputer)
If $WMIOkay
$Details = GetBIOSInfo($sComputer)
? '*** ' + $sComputer + ' ***' ?
'*********************' ?
For Each $Detail In $Details
$Detail ?
Next
EndIf
EndIf
EndIf
Next
Exit @ERROR

Function GetBIOSInfo(optional $sComputer)
Dim $WMIService,$BIOSItems,$BIOSName,$BIOSVersion,$SMBIOSVersion
Dim $Item, $SerialNumber, $Manufacturer, $BIOSArray[4]
$sComputer=IIf(Not $sComputer,'','\\'+Join(Split($sComputer,'\'),'',3)+'\')
$WMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!"+$sComputer+'root\cimv2')
$BIOSItems = $WMIService.ExecQuery("Select * from Win32_BIOS where PrimaryBIOS = true", , 48 )
For Each $Item in $BIOSItems
$BIOSName = Trim($Item.Name)
$BIOSVersion = Trim($Item.Version)
$SMBIOSVersion = Trim($Item.SMBIOSBIOSVersion)
$SerialNumber = Trim($Item.SerialNumber)
$Manufacturer = Trim($Item.Manufacturer)
Next
$BIOSArray[0]=$BIOSName $BIOSArray[1]=$BIOSVersion $BIOSArray[2]=$SMBIOSVersion $BIOSArray[3]=$SerialNumber
$BIOSArray[4]=$Manufacturer
$GetBIOSInfo=$BIOSArray
EndFunction

Function ReadFile($file)
Dim $lf, $f, $_, $t
$lf=CHR(10)
$f=FreeFileHandle
$_=Open($f,$file)
If @ERROR Exit @ERROR EndIf
Do $t=$t+$lf+ReadLine($f) Until @ERROR
$_=Close($f)
$ReadFile=Split(SubStr($t,2),$lf)
EndFunction

Function Ping($PC)
Shell'%comspec% /c ping -n 1 '+$PC+' >nul'
$Ping = NOT @ERROR
EndFunction

Function ConfirmWMI(optional $sComputer)
Dim $objWMIService,$objWMISetting,$colWMISettings
$sComputer=IIf(Not $sComputer,'','\\'+Join(Split($sComputer,'\'),'',3)+'\')
$objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!"+$sComputer+'root\cimv2')
If @ERROR
$ConfirmWMI = Val("&"+Right(DecToHex(@ERROR),4))
Exit $ConfirmWMI
EndIf
$colWMISettings = $objWMIService.ExecQuery("Select * from Win32_WMISetting")
For Each $objWMISetting In $colWMISettings
$ConfirmWMI = $objWMISetting.BuildVersion
Next
Exit $ConfirmWMI
EndFunction

 

Top
#155979 - 2006-01-26 03:12 AM Re: Problems with calling array elements in strings...
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
Again though for a production script where you would probably be doing more logging you'd want some more code in there for @ERROR results and on what system it failed, etc.. and then log that to a report.
 

Top
#155980 - 2006-01-26 03:17 AM Re: Problems with calling array elements in strings...
thepip3r Offline
Hey THIS is FUN
*****

Registered: 2005-03-02
Posts: 350
I get the same result adding those two functions in, it just comes back immediately now instead of lagging out for 15 secs like the old script did. Here's what it looks like:

1. I'm running version 2010 or 4.51 as the executable reads
2. My script works for the first computer, then it goes to the second one and errors out...

Code:
Break ON
$ = SetOption("WrapAtEOL","ON")
Global $BIOSArray[4]

$LogFile = "C:\computer_list.txt"
$OutputFile = "C:\output_file.txt"
$OpenListFile = OPEN(4,$LogFile,2)
$OpenLogFile = OPEN(5,$OutputFile,5)


If $OpenListFile = 0
$CurrentPC = ReadLine(4)
If $OpenLogFile = 0
DO
? $CurrentPC
$ = WRITELINE(5,"$CurrentPC, ")
$ping = Ping($CurrentPC)
IF $ping
$WMICheck = ConfirmWMI($CurrentPC)
IF $WMICheck >= '1085.0005'
$MyBIOSInfo = GetBIOSInfo("$CurrentPC")
$ = WRITELINE(5, $MyBIOSInfo[3] + @CRLF)
Else
$ = WRITELINE(5, "WMI not responding." + @CRLF)
Endif
ELSE
$ = WRITELINE(5, "Did not respond." + @CRLF)
ENDIF

$CurrentPC = ReadLine(4)
UNTIL @ERROR = -1
ENDIF
ENDIF

CLOSE(4)
CLOSE(5)

Sleep 5


Function GetBIOSInfo($Computer)
Dim $Computer, $WMIService, $BIOSItems, $BIOSName, $BIOSVersion, $SMBIOSVersion
Dim $Item, $SerialNumber, $Manufacturer
;$Computer = "."
$WMIService = GetObject("winmgmts:\\" + $Computer + "\root\cimv2")
$BIOSItems = $WMIService.ExecQuery( "Select * from Win32_BIOS where PrimaryBIOS = true", , 48 )
For Each $Item in $BIOSItems
$BIOSName = Trim($Item.Name)
$BIOSVersion = Trim($Item.Version)
$SMBIOSVersion = Trim($Item.SMBIOSBIOSVersion)
$SerialNumber = Trim($Item.SerialNumber)
$Manufacturer = Trim($Item.Manufacturer)
Next
$BIOSArray[0]=$BIOSName $BIOSArray[1]=$BIOSVersion $BIOSArray[2]=$SMBIOSVersion $BIOSArray[3]=$SerialNumber
$BIOSArray[4]=$Manufacturer
$GetBIOSInfo=$BIOSArray
EndFunction


Function Ping($PC)
Shell'%comspec% /c ping -n 1 '+$PC+' >nul'
$Ping = NOT @ERROR
EndFunction


Function ConfirmWMI(optional $sComputer)
Dim $objWMIService,$objWMISetting,$colWMISettings
$sComputer=IIf(Not $sComputer,'','\\'+Join(Split($sComputer,'\'),'',3)+'\')
$objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!"+$sComputer+'root\cimv2')
If @ERROR
$ConfirmWMI = Val("&"+Right(DecToHex(@ERROR),4))
Exit $ConfirmWMI
EndIf
$colWMISettings = $objWMIService.ExecQuery("Select * from Win32_WMISetting")
For Each $objWMISetting In $colWMISettings
$ConfirmWMI = $objWMISetting.BuildVersion
Next
Exit $ConfirmWMI
EndFunction


Top
#155981 - 2006-01-26 03:23 AM Re: Problems with calling array elements in strings...
thepip3r Offline
Hey THIS is FUN
*****

Registered: 2005-03-02
Posts: 350
Sorry, didn't see post #155619. I tried that script and for some reason it started out with a different computer and worked, then went onot the first computer in the list, then error'd out like all of the others...
Top
#155982 - 2006-01-26 03:24 AM Re: Problems with calling array elements in strings...
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
For now please DO NOT run your script.

Copy the script EXACTLY as I have it to see if it works for you. THEN we can work on actually logging the results.
 
Just copy the latest script I posted and run it (assuming your text file is there where you run the script from)
 

Top
#155983 - 2006-01-26 03:30 AM Re: Problems with calling array elements in strings...
thepip3r Offline
Hey THIS is FUN
*****

Registered: 2005-03-02
Posts: 350
Ok... I won't run my script. Your script skips the first computer, pulls the 2nd and 3rd's information and then errors out on the 4th... The reason I know that is because it shows the information for the 2nd and 3rd and then immediately errors out with the same error as b4.
Top
#155984 - 2006-01-26 03:34 AM Re: Problems with calling array elements in strings...
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
Can you create a new TEXT file and only run a couple of the computers in it please. Let me make a few changes and then I'll post again and you can run it and test it.

I've run this on a couple so I know it works. Let me make a few changes though. Be back in a bit.
 

Top
#155985 - 2006-01-26 03:36 AM Re: Problems with calling array elements in strings...
thepip3r Offline
Hey THIS is FUN
*****

Registered: 2005-03-02
Posts: 350
Thanx for all of the help NTDOC, you too Les.
Top
#155986 - 2006-01-26 03:54 AM Re: Problems with calling array elements in strings...
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
Okay, I've now ran this on a dozen computers and they all responded except for 1 which I put in a bogus name on purpose in the middle.

Please run this and then post back on the board the output so I can see what's going on.

Remember, only run this script, nothing you've added/modified before. Also make sure the text file of the computer names is new and created with something like NOTEPAD or other normal ASCII Editor and not something like MS Word, Wordpad, or Wordperfect.


Break On
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('NoMacrosInStrings','On')

Dim $sComputers,$sComputer,$Details,$Detail
Dim $Alive,$WMIOkay
$sComputers = ReadFile(@ScriptDir+'\'+'computer_list.txt')
'Reading computer list: ' + ' ::Error results: ' +@ERROR + ' ' +@SERROR ?
For Each $sComputer In $sComputers
If $sComputer
'Computer ' + $sComputer + ' found ' + ' ::Error results: ' +@ERROR + ' ' +@SERROR ?
$Alive = Ping($sComputer)
'pinging ' + $sComputer + + ' ::Error results: ' +@ERROR + ' ' +@SERROR ?
If $Alive
'Computer ' $sComputer + ' responded to ping ' + ' ::Error results: ' +@ERROR + ' ' +@SERROR ?
$WMIOkay = ConfirmWMI($sComputer)
'Checking WMI on ' + $sComputer + ' ::Error results: ' +@ERROR + ' ' +@SERROR ?
If $WMIOkay
'WMI appears to be responding for ' + $sComputer + ' ::Error results: ' +@ERROR + ' ' +@SERROR ?
$Details = GetBIOSInfo($sComputer)
'Checking BIOS for ' + $sComputer + ' ::Error results: ' +@ERROR + ' ' +@SERROR ?
For Each $Detail In $Details
'BIOS for ' +$sComputer +': ' + $Detail + ' ::Error results: ' +@ERROR + ' ' +@SERROR ?
Next
EndIf
EndIf
EndIf
??
Next


Function GetBIOSInfo(optional $sComputer)
Dim $WMIService,$BIOSItems,$BIOSName,$BIOSVersion,$SMBIOSVersion
Dim $Item, $SerialNumber, $Manufacturer, $BIOSArray[4]
$sComputer=IIf(Not $sComputer,'','\\'+Join(Split($sComputer,'\'),'',3)+'\')
$WMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!"+$sComputer+'root\cimv2')
$BIOSItems = $WMIService.ExecQuery("Select * from Win32_BIOS where PrimaryBIOS = true", , 48 )
For Each $Item in $BIOSItems
$BIOSName = Trim($Item.Name)
$BIOSVersion = Trim($Item.Version)
$SMBIOSVersion = Trim($Item.SMBIOSBIOSVersion)
$SerialNumber = Trim($Item.SerialNumber)
$Manufacturer = Trim($Item.Manufacturer)
Next
$BIOSArray[0]=$BIOSName $BIOSArray[1]=$BIOSVersion $BIOSArray[2]=$SMBIOSVersion $BIOSArray[3]=$SerialNumber
$BIOSArray[4]=$Manufacturer
$GetBIOSInfo=$BIOSArray
EndFunction

Function ReadFile($file)
Dim $lf, $f, $_, $t
$lf=CHR(10)
$f=FreeFileHandle
$_=Open($f,$file)
If @ERROR Exit @ERROR EndIf
Do $t=$t+$lf+ReadLine($f) Until @ERROR
$_=Close($f)
$ReadFile=Split(SubStr($t,2),$lf)
EndFunction

Function Ping($PC)
Shell'%comspec% /c ping -n 1 '+$PC+' >nul'
$Ping = NOT @ERROR
EndFunction

Function ConfirmWMI(optional $sComputer)
Dim $objWMIService,$objWMISetting,$colWMISettings
$sComputer=IIf(Not $sComputer,'','\\'+Join(Split($sComputer,'\'),'',3)+'\')
$objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!"+$sComputer+'root\cimv2')
If @ERROR
$ConfirmWMI = Val("&"+Right(DecToHex(@ERROR),4))
Exit $ConfirmWMI
EndIf
$colWMISettings = $objWMIService.ExecQuery("Select * from Win32_WMISetting")
For Each $objWMISetting In $colWMISettings
$ConfirmWMI = $objWMISetting.BuildVersion
Next
Exit $ConfirmWMI
EndFunction

 

Top
#155987 - 2006-01-26 04:10 AM Re: Problems with calling array elements in strings...
thepip3r Offline
Hey THIS is FUN
*****

Registered: 2005-03-02
Posts: 350
copied and pasted that exact code into Notepad. Cut and pasted 13 of the computer names from the original list into another Notepad file and saved it with computer_list.txt. I ran the script. I got the same results:

Code:

-------------------------------------------------------------------
*** Computer_1 ***
*****************
BIOS Date: 01/22/04 09:53:47 Ver: 08.00.10
Intel - 20040122
BF86510A.86A.0053.P13.0401220953
3912720-0001
Intel Corp.

*** Computer_5 ***
*****************
BIOS Date: 01/22/04 09:53:47 Ver: 08.00.10
Intel - 20040122
BF86510A.86A.0053.P13.0401220953
3912720-0001
Intel Corp.

ERROR : expected ')'!
Script : C:\docs and settings\my profile\desktop\serial4.kix
Line : 33
---------------------------------------------------------------------



That's the screenshot I took before it closed...

Top
#155988 - 2006-01-26 04:38 AM Re: Problems with calling array elements in strings...
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
Okay, now I see the problem. It's actually the poor coding of the BIOS UDF that you're using (which looks like the one I wrote a couple years ago )

Okay, let me take a look at the UDF and see if I can fix it.
 

Top
#155989 - 2006-01-26 04:55 AM Re: Problems with calling array elements in strings...
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
Hmmm, okay - only minor changes. Try this and let me know please.

Break On
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('NoMacrosInStrings','On')

Dim $sComputers,$sComputer,$Details,$Detail
Dim $Alive,$WMIOkay
$sComputers = ReadFile(@ScriptDir+'\'+'computer_list.txt')
'Reading computer list: ' + ' ::Error results: ' +@ERROR + ' ' +@SERROR ?
For Each $sComputer In $sComputers
If $sComputer
'Computer ' + $sComputer + ' found ' + ' ::Error results: ' +@ERROR + ' ' +@SERROR ?
$Alive = Ping($sComputer)
'pinging ' + $sComputer + + ' ::Error results: ' +@ERROR + ' ' +@SERROR ?
If $Alive
'Computer ' $sComputer + ' responded to ping ' + ' ::Error results: ' +@ERROR + ' ' +@SERROR ?
$WMIOkay = ConfirmWMI($sComputer)
'Checking WMI on ' + $sComputer + ' ::Error results: ' +@ERROR + ' ' +@SERROR ?
If $WMIOkay
'WMI appears to be responding for ' + $sComputer + ' ::Error results: ' +@ERROR + ' ' +@SERROR ?
$Details = GetBIOSInfo($sComputer)
'Checking BIOS for ' + $sComputer + ' ::Error results: ' +@ERROR + ' ' +@SERROR ?
For Each $Detail In $Details
If $Detail
'BIOS for ' +$sComputer +': ' + $Detail + ' ::Error results: ' +@ERROR + ' ' +@SERROR ?
EndIf
Next
EndIf
EndIf
EndIf
??
Next


Function GetBIOSInfo(optional $sComputer)
Dim $WMIService,$BIOSItems,$BIOSName,$BIOSVersion,$SMBIOSVersion
Dim $Item, $SerialNumber, $Manufacturer, $BIOSArray[4]
$sComputer=IIf(Not $sComputer,'','\\'+Join(Split($sComputer,'\'),'',3)+'\')
$WMIService = GetObject('winmgmts:{impersonationLevel=impersonate}!'+$sComputer+'root\cimv2')
$BIOSItems = $WMIService.ExecQuery('Select * from Win32_BIOS where PrimaryBIOS = true',,48)
For Each $Item in $BIOSItems
If $Item
$BIOSName = Trim($Item.Name)
$BIOSVersion = Trim($Item.Version)
$SMBIOSVersion = Trim($Item.SMBIOSBIOSVersion)
$SerialNumber = Trim($Item.SerialNumber)
$Manufacturer = Trim($Item.Manufacturer)
EndIf
Next
$BIOSArray[0]=$BIOSName $BIOSArray[1]=$BIOSVersion $BIOSArray[2]=$SMBIOSVersion $BIOSArray[3]=$SerialNumber
$BIOSArray[4]=$Manufacturer
$GetBIOSInfo=$BIOSArray
EndFunction

Function ReadFile($file)
Dim $lf, $f, $_, $t
$lf=CHR(10)
$f=FreeFileHandle
$_=Open($f,$file)
If @ERROR Exit @ERROR EndIf
Do $t=$t+$lf+ReadLine($f) Until @ERROR
$_=Close($f)
$ReadFile=Split(SubStr($t,2),$lf)
EndFunction

Function Ping($PC)
Shell'%comspec% /c ping -n 1 '+$PC+' >nul'
$Ping = NOT @ERROR
EndFunction

Function ConfirmWMI(optional $sComputer)
Dim $objWMIService,$objWMISetting,$colWMISettings
$sComputer=IIf(Not $sComputer,'','\\'+Join(Split($sComputer,'\'),'',3)+'\')
$objWMIService = GetObject('winmgmts:{impersonationLevel=impersonate}!'+$sComputer+'root\cimv2')
If @ERROR
$ConfirmWMI = Val('&'+Right(DecToHex(@ERROR),4))
Exit $ConfirmWMI
EndIf
$colWMISettings = $objWMIService.ExecQuery('Select * from Win32_WMISetting')
For Each $objWMISetting In $colWMISettings
$ConfirmWMI = $objWMISetting.BuildVersion
Next
Exit $ConfirmWMI
EndFunction

 

Top
#155990 - 2006-01-26 04:56 AM Re: Problems with calling array elements in strings...
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You need to be careful that there are no trailing spaces in the text file. That was why I asked you to sent the name to the screen with square brackets. The GET command was simply to pause the script between iterations.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#155991 - 2006-01-26 05:04 AM Re: Problems with calling array elements in strings...
thepip3r Offline
Hey THIS is FUN
*****

Registered: 2005-03-02
Posts: 350
Ran perfectly, thanx so much for the help gentlemen! I'll work on it from here NTDOC to see if I can get it to write to a file. THANX SO MUCH AGAIN GUYS!!! I APPRECIATE YOU GUYS CHOKING THROUGH THAT WITH ME!!!

p.s. it's the end of my shift here in Iraq so I'll talk to you gents tomorrow!


Edited by thepip3r (2006-01-26 05:06 AM)

Top
#155992 - 2006-01-26 05:42 AM Re: Problems with calling array elements in strings...
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
Well I would never have thought of it, but Les was spot on with his diagnosis. It would appear that one or more of the computers in your list either had a leading space or a trailing space. I added some trailing spaces to my list of computers and got the same error you did. By adding the code below it then ran correctly again.

Thanks Les

By adding this, it removes any of those spaces in the file
(though it's better if you didn't have spaces in the first place)
$sComputer = Trim($sComputer)

 
Try this code out now and hopefully it should work correctly on your whole list. Then you can start working on logging it.
 
Break On
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('NoMacrosInStrings','On')

Dim $sComputers,$sComputer,$Details,$Detail
Dim $Alive,$WMIOkay,$CleanUp
$sComputers = ReadFile(@ScriptDir+'\'+'computer_list.txt')
For Each $sComputer In $sComputers
$sComputer = Trim($sComputer)
If $sComputer
$Alive = Ping($sComputer)
If $Alive
$WMIOkay = ConfirmWMI($sComputer)
If $WMIOkay
$Details = GetBIOSInfo($sComputer)
For Each $Detail In $Details
If $Detail
'BIOS for ' +$sComputer +': ' + $Detail ?
EndIf
Next
EndIf
EndIf
EndIf
??
Next

Function GetBIOSInfo(optional $sComputer)
Dim $WMIService,$BIOSItems,$BIOSName,$BIOSVersion,$SMBIOSVersion
Dim $Item, $SerialNumber, $Manufacturer, $BIOSArray[4]
$sComputer=IIf(Not $sComputer,'','\\'+Join(Split($sComputer,'\'),'',3)+'\')
$WMIService = GetObject('winmgmts:{impersonationLevel=impersonate}!'+$sComputer+'root\cimv2')
$BIOSItems = $WMIService.ExecQuery('Select * from Win32_BIOS where PrimaryBIOS = true',,48)
For Each $Item in $BIOSItems
If $Item
$BIOSName = Trim($Item.Name)
$BIOSVersion = Trim($Item.Version)
$SMBIOSVersion = Trim($Item.SMBIOSBIOSVersion)
$SerialNumber = Trim($Item.SerialNumber)
$Manufacturer = Trim($Item.Manufacturer)
EndIf
Next
$BIOSArray[0]=$BIOSName $BIOSArray[1]=$BIOSVersion $BIOSArray[2]=$SMBIOSVersion $BIOSArray[3]=$SerialNumber
$BIOSArray[4]=$Manufacturer
$GetBIOSInfo=$BIOSArray
EndFunction

Function ReadFile($file)
Dim $lf, $f, $_, $t
$lf=CHR(10)
$f=FreeFileHandle
$_=Open($f,$file)
If @ERROR Exit @ERROR EndIf
Do $t=$t+$lf+ReadLine($f) Until @ERROR
$_=Close($f)
$ReadFile=Split(SubStr($t,2),$lf)
EndFunction

Function Ping($sComputer)
Shell'%comspec% /c ping -n 1 '+$sComputer+' >nul'
$Ping = NOT @ERROR
EndFunction

Function ConfirmWMI(optional $sComputer)
Dim $objWMIService,$objWMISetting,$colWMISettings
$sComputer=IIf(Not $sComputer,'','\\'+Join(Split($sComputer,'\'),'',3)+'\')
$objWMIService = GetObject('winmgmts:{impersonationLevel=impersonate}!'+$sComputer+'root\cimv2')
If @ERROR
$ConfirmWMI = Val('&'+Right(DecToHex(@ERROR),4))
Exit $ConfirmWMI
EndIf
$colWMISettings = $objWMIService.ExecQuery('Select * from Win32_WMISetting')
For Each $objWMISetting In $colWMISettings
$ConfirmWMI = $objWMISetting.BuildVersion
Next
Exit $ConfirmWMI
EndFunction

 

Top
#155993 - 2006-01-26 05:44 AM Re: Problems with calling array elements in strings...
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
Quote:

it's the end of my shift here in Iraq so I'll talk to you gents tomorrow!




So you military, civilian, native of Iraq?

How large a network you working with there?
 

Top
#155994 - 2006-01-26 05:43 PM Re: Problems with calling array elements in strings...
thepip3r Offline
Hey THIS is FUN
*****

Registered: 2005-03-02
Posts: 350
Hey Doc, I got some bad news; I just didn't let the script run long enough. I ran both the scripts in #155634 and #155631 and it still error'd out, just farther down the list. It just scrolled so much information last night when I saw it that I assumed it was working correctly. In troubleshooting, I had already opened my computer_list.txt file in both Notepad and Word and removed all single space characters so that should've stopped the problem if that WAS the problem.

To answer your questions, I'm in the military and I work on a medium size domain that is a tree in a much larger forest...

Something I just looked at too. I took a screen shot of the error before it closed and some of your error trapping may have caught the problem... Would an "Access is denied" error cause the problems I am seeing?

Top
#155995 - 2006-01-26 07:51 PM Re: Problems with calling array elements in strings...
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
No an access denied should not stop the process as we did not set any code to quit on any error. The individual UDFS have exit codes but only to exit the UDF, not the main script.

Can you e-mail me the list so I can review it for potential issues? If not that's okay - things to look for are maybe special characters or names or spaces in the middle of names.

Really review the list of names for oddities.

How many systems are in the list?
 

Top
#155996 - 2006-01-26 07:55 PM Re: Problems with calling array elements in strings...
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
ps Are you sure you're using the latest version of the script? You mentioned that in my error code outputs you see the error, but I don't have any in the last version.

Is if possible you've altered the script some how from what was posted last?
 

Top
#155997 - 2006-01-26 08:17 PM Re: Problems with calling array elements in strings...
thepip3r Offline
Hey THIS is FUN
*****

Registered: 2005-03-02
Posts: 350
I emailed you the latest script, the computer list, a screen shot of the error, and a screen shot of my KiX version. serial5.kix has been the latest and all I did was cut and paste the code directly from KORG into the file and ran it. I tried both scripts from posts #155634 and #155631.
Top
Page 2 of 3 <123>


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 584 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.051 seconds in which 0.019 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org