Page 3 of 4 <1234>
Topic Options
#139335 - 2005-10-20 05:54 PM Re: My Computer Info - for Help Desk use PART 4
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
I've tweaked the HTML code generation script to read INI files... all looping so any ini file with any number of sections can be read and displayed

The first section reads a straight ini and displays each section in its own table in 2 column format

The second reads another ini but splits the DATA field into additional columns

Code:

Break on
If Not IsDeclared($_UDF_LIB) Call @scriptdir+'\UDFs.kix' EndIf
If Not IsDeclared($_INV_LIB) Call @scriptdir+'\Inventory.kix' EndIf

$SerNo =WMIQuery("SerialNumber","Win32_BIOS")
If Len($SerNo) < 2
$SerNo=WMIQuery("SerialNumber","Win32_SystemEnclosure")
If InStr($serno,"|")
For Each $Return in Split($serno,"|")
If Len($Return)<10 $serno=$Return EndIf
Next
EndIf
EndIf
$SerNo =Trim(Ucase($SerNo))
$icon = @scriptdir + '\AHCA.ico'
$InvFile= @scriptdir + '\'+$SerNo+'.ini'
$SoftFile= @scriptdir + '\'+$SerNo+'_Software.ini'
$HTMLLog= @scriptdir + '\'+$SerNo+'.htm'

$haRd = '#cf2e4d'
$haBu = '#0000cf'
$hRed = '#ff0000'
$hBlu = '#0000ff'
$hGrn = '#00bb00'
$hBwn = '#800000'
$hBlc = '#000000'
$hgry = '#777777'
$bkgr = '#ffffcc'

if not exist($InvFile)
CollectData($InvFile)
ENDIF

$HTMLTableOpen = '<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse"'
+' bordercolor="#cccccc" width="100%" id="AutoNumber1">'+@CRLF
$HTMLTableClose= '</table>'+@CRLF
$ImageLocation = ''


; ********************************* Header *************************************

$WL = '<html>'+@CRLF
+'<head>'+@CRLF
+'<meta http-equiv="Content-Language" content="en-us">'+@CRLF
+'<meta name="GENERATOR" content=KiXtart '+@KIX+'>'+@CRLF
+'<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">'+@CRLF

+'<title>'+ 'Details on ' + $SerNo +'</title>'+@CRLF

+'</head>'+@CRLF
+'<body bgproperties="fixed" bgcolor="'+$bkgr+'" background="'+$ImageLocation+'">'+@CRLF
+'<p>'+@CRLF
+'<img src="Picture1.gif">'
+'<p><b><font size="5" color="'+$haBu+'">INVENTORY INFORMATION FOR: '+'</font></b>'+@CRLF
+'<b><font size="5" color="'+$haRd+'">'+$SerNo+'</font></b></p>'+@CRLF

; ****************************** Hardware Inventory *************************************

$sections = split(readprofilestring($InvFile,'',''),chr(10))
for each $section in $sections
if $section > " "
$wl = $wl +'<p><b><font size="4" color="'+$hBwn+'">'+$section+'</font></b></p>'+@CRLF
$wl = $wl + $HTMLTableOpen
$color= $hBlc,$hRed,$hBlc,$hBlc,$hRed
$Inv = Getini($InvFile,$section)
for $entry = 0 to ubound($Inv) step 2
$one = split($Inv[$entry],',')
if $entry+1 <= ubound($Inv)
$Two = split($Inv[$entry+1],',')
else
$Two = ' ',' ',' '
endif
$line = $one[1],$one[2],' ',$two[1],$two[2]
$wl = $wl + HTMLRow($line, $color)
next
$WL = $WL + $HTMLTableClose
endif
next

; ***************************** Software Inventory **********************************

$wl = $wl + '<p><b><font size="4" color="'+$hBwn+'">APPLICATIONS INSTALLED</font></b></p>'+@CRLF

$wl = $wl + $HTMLTableOpen
$color= $hBlc,$hBlc,$hRed,$hBlu,$hgrn

$sections = split(readprofilestring($SoftFile,'',''),chr(10))
for each $section in $sections
if $section > " "
$line = join(split($section,'_'),' '),' ',' ',' ',' '
$wl = $wl + HTMLRow($line, $color)

$SoftInv = Getini($SoftFile,$section,chr(9))
for each $entry in $SoftInv
$one = split($entry,chr(9))
redim preserve $one[5]
$line = ' ',$one[1],$one[2],$one[3],$one[4]
$wl = $wl + HTMLRow($line, $color)
next
endif
next
$WL = $WL + $HTMLTableClose


; ****************************** footer ***********************************

$WL = $WL +'<p><b><font size="2" color="'+$hBlu+'">'+"Date of report: "+@Date+'</font></b></p>'+@CRLF
+ '</body>'+@CRLF
+ '</html>'+@CRLF

; *****************************************************************************

del $HTMLLog

$Handle = FreeFileHandle()
$OpenFile = Open($Handle, $HTMLLog,5)
$WL = WriteLine($Handle,$WL + @CRLF)
$CloseFile = Close($Handle)

run 'cmd /c start iexplore "'+$htmllog+'"'



there are only a few UDFs used
Code:


If Not IsDeclared($_UDF_LIB)
Global $_UDF_LIB
EndIf



Function WMIQuery($what,$from,optional $computer,optional $where, optional $x)
Dim $strQuery, $objEnumerator, $value
If NOT $computer $computer="@WKSTA" EndIf
$strQuery = "Select $what From $from"
If $where AND $x $strQuery = $strQuery + " Where $where = '$x'" EndIf
$SystemSet = GetObject("winmgmts:{impersonationLevel=impersonate}!//$computer")
$objEnumerator = $SystemSet.ExecQuery($strQuery)
For Each $objInstance in $objEnumerator
If @Error = 0 AND $objInstance <> ""
$=Execute("$$value = $$objInstance.$what")
$WMIQuery="$value"+"|"+"$WMIQuery"
EndIf
Next
$WMIQuery=Left($WMIQuery,Len($WMIQuery)-1)
Exit @error
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 WriteFile($file,$array)
Dim $, $f, $line
If NOT VarType($Array) & 8192 Exit(1) EndIf
$f=FreeFileHandle
$=Open($f,$file,5)
If @error Exit @error EndIf
For Each $line in $array
$=WriteLine($f,$line+@crlf)
If @error Exit @error EndIf
Next
$=Close($f)
EndFunction

Function GetINI($File,optional $Section, optional $d)
DIM $Rootdata, $sec, $i, $ii, $secdata, $Error
DIM $Tarray[0]
If not $d $d = "," EndIf
If not Exist($file) Exit(2) EndIf
$Rootdata = Split(ReadProfileString($file,$section,""),CHR(10))
If UBound($rootdata) = 0 Exit(13) EndIf
ReDIM preserve $rootdata[ubound($rootdata)-1]
If not $section
$i = 0
For Each $sec In $rootdata
$secData = GetINI($file,$sec,$d)
$error = @ERROR
ReDIM preserve $tarray[UBound($tarray)+UBound($secdata)+1]
For $ii = 0 To UBound($secdata)
$tarray[$i] = $secdata[$ii]
$i = $i + 1
Next
Next
If UBound($tarray) > 0 ReDIM preserve $tarray[$i-1] EndIf
Else
ReDIM preserve $tarray[ubound($rootdata)]
For $i = 0 To UBound($rootdata)
$tarray[$i]=$section+$d+$Rootdata[$i]+$d+ReadProfileString($file,$section,$Rootdata[$i])
Next
EndIf
$GetINI = $tarray
Exit($error)
EndFunction

function arrayenumkey($regsubkey)
dim $retcode, $subkeycounter, $currentsubkey, $subkeyarray
if not keyexist($regsubkey) exit 87 endif
$subkeycounter=0
do
$currentsubkey=enumkey($regsubkey,$subkeycounter)
if not @ERROR
redim preserve $subkeyarray[$subkeycounter]
$subkeyarray[$subkeycounter]=$currentsubkey
$subkeycounter=$subkeycounter+1
endif
until @ERROR
$arrayenumkey=$subkeyarray
exit 0
endfunction

Function HTMLRow($arrElements, $arrColor)
$cols=Ubound($arrelements)
if not Ubound($arrelements) =Ubound($arrColor)
exit 1
endif
$colWidth = 100/($cols+1)
$HTMLRow = ' <tr>'+@CRLF
for $item = 0 to $cols
$HTMLRow = $HTMLRow +' <td width="'+$colwidth+'%" height="19"><font size="2" color="'+$arrColor[$item]+'">'+$arrElements[$item]+'</td>'+@CRLF
next
$HTMLRow = $HTMLRow +' </tr>'+@CRLF
Endfunction

return
Code:





_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#139336 - 2005-10-20 06:13 PM Re: My Computer Info - for Help Desk use PART 4
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
the inventory script
Code:


If Not IsDeclared($_UDF_INV)
Global $_UDF_INV
EndIf


Function CollectData($InvFile)
$ip = EnumIPInfo($nic,0)
$snm = EnumIPInfo($nic,1)
$NicDesc= EnumIPInfo($nic,2)
$mygw = EnumIPInfo($nic,3)

$Mac =WMIQuery("MACAddress","Win32_NetworkAdapterConfiguration",,"Description",$NicDesc)
$Mac =Join(Split($mac,':'),'')
$Mac =Left($mac,InStr($mac,'|')-1)

$pingloop = iif(val(WMIQuery('StatusCode', 'Win32_PingStatus',,'Address','127.0.0.1')),'No Response','OK')
$pinggate = iif(val(WMIQuery('StatusCode', 'Win32_PingStatus',,'Address',$mygw)),'No Response','OK')
$pingmail = iif(val(WMIQuery('StatusCode', 'Win32_PingStatus',,'Address','fdhcmail')),'No Response','OK')
$pingproxy = iif(val(WMIQuery('StatusCode', 'Win32_PingStatus',,'Address','proxy')),'No Response','OK')
$pinginet = iif(val(WMIQuery('StatusCode', 'Win32_PingStatus',,'Address','www.yahoo.com')),'No Response','OK')

$HD =WMIQuery("Size","Win32_DiskDrive")
$hdGB =Left($hd,Len($hd)-9)
$hdMBfr =GetDiskSpace("c:")/1000
$Video =WMIQuery("Description","Win32_VideoController")
$Printer=WMIQuery("DriverName","Win32_Printer",,"SystemName","@wksta")
$modem =WMIQuery("Description","Win32_POTSModem",,"Status","OK")
$Biosv =WMIQuery("SMBIOSBIOSVersion","Win32_BIOS")
$biosd =WMIQuery("Version","Win32_BIOS")
$Make =Trim(Split(WMIQuery("Manufacturer","Win32_ComputerSystem"))[0])
$Model =trim(WMIQuery("Model","Win32_ComputerSystem"))
Select
Case InStr("$model","pro") $Case="Desktop"
Case InStr("$model","evo") $Case="Desktop"
Case InStr("$model","opt") $Case="Desktop"
Case InStr("$model","lat") $Case="Laptop"
Case 1 $Case="Not Specified"
EndSelect
$asset =WMIQuery("SMBIOSAssetTag","Win32_SystemEnclosure")
If InStr($asset,"|")
For Each $Return in Split($asset,"|")
If $Return $asset=$Return EndIf
Next
EndIf
$SerNo =WMIQuery("SerialNumber","Win32_BIOS")
If Len($SerNo) < 2
$SerNo=WMIQuery("SerialNumber","Win32_SystemEnclosure")
If InStr($serno,"|")
For Each $Return in Split($serno,"|")
If Len($Return)<10 $serno=$Return EndIf
Next
EndIf
EndIf
$SerNo =Trim(Ucase($SerNo))

$CPUsp =WMIQuery("CurrentClockSpeed","Win32_Processor")
Select
case left($CPUsp,3) = "339" $CPUsp=3400
case left($CPUsp,3) = "319" $CPUsp=3200
case left($CPUsp,3) = "279" $CPUsp=2800
case left($CPUsp,3) = "269" $CPUsp=2600
case left($CPUsp,3) = "239" $CPUsp=2400
case left($CPUsp,3) = "229" $CPUsp=2200
case left($CPUsp,3) = "199" $CPUsp=2000
case left($CPUsp,3) = "179" $CPUsp=1800
case left($CPUsp,3) = "169" $CPUsp=1700
case left($CPUsp,3) = "139" $CPUsp=1400
case left($CPUsp,3) = "106" $CPUsp=1100
case left($CPUsp,2) = "99" $CPUsp=1000
case left($CPUsp,2) = "90" $CPUsp=900
case left($CPUsp,2) = "85" $CPUsp=850
case left($CPUsp,2) = "70" $CPUsp=700
case left($CPUsp,2) = "66" $CPUsp=667
case left($CPUsp,2) = "59" $CPUsp=600
case left($CPUsp,2) = "49" $CPUsp=500
case left($CPUsp,2) = "39" $CPUsp=400
EndSelect

$dimms =Split(WMIQuery("Capacity","Win32_PhysicalMemory"),"|")
For $a=0 to Ubound($dimms)
$=Execute("$$dimm$a=val($$dimms[$a]) / 1048576")
$=Execute("$$memory=val($$Memory)+val($$dimm$a)")
Next
$ier =ReadValue("HKLM\Software\Microsoft\Internet Explorer", "Version")
$MSOdir =ReadValue("HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\excel.exe","Path")
$access =GetFileVersion("$MSOdir\msaccess.exe")
$excel =GetFileVersion("$MSOdir\excel.exe")
$outlook =GetFileVersion("$MSOdir\outlook.exe")
$powerpnt =GetFileVersion("$MSOdir\powerpnt.exe")
$pub =GetFileVersion("$MSOdir\mspub.exe")
$Word =GetFileVersion("$MSOdir\winword.exe")
$vscanver =ReadValue("HKLM\Software\Network Associates\TVD\VirusScan","szCurrentVersionNumber")
$vscaneng =ReadValue("HKLM\Software\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx","szEngineVer")
$vscandat =ReadValue("HKLM\Software\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx","szDatVersion")

If KeyExist('HKLM\SOFTWARE\Cognos')
$cogdir=ReadValue('HKLM\SOFTWARE\Cognos','CognosIni')
If Right($cogdir,2)='..' $cogdir=Split($cogdir,'..')[0] EndIf
$impver=GetFileVersion($cogdir+'bin\impuser.exe')
EndIf
$aspenexe=ReadValue('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ASE.exe','')
If Exist($aspenexe) $asefiletime=GetFileTime($aspenexe) EndIf
$acroexe=ReadValue('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Acrobat.exe','')
If Exist($acroexe) $acrobat=GetFileVersion($acroexe) EndIf


$OSKey = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows XP'
$spKey = arrayenumkey($OSKey)
for each $key in $SpKey
$patches = arrayenumkey($OSkey+'\'+$Key)
$hotfix = $hotfix +' ' + Join($patches,' ')
next
$hotfix = substr($hotfix,2)

$=WriteProfileString($InvFile,"Inventory","Date",@Date)
$=WriteProfileString($InvFile,"Inventory","Time",@time)

$=WriteProfileString($InvFile,"Network","IPAddress",$IP)
$=WriteProfileString($InvFile,"Network","SubnetMask",$snm)
$=WriteProfileString($InvFile,"Network","Gateway",$MyGW)
$=WriteProfileString($InvFile,"Network","Adapter",$NicDesc)
$=WriteProfileString($InvFile,"Network","Mac",$Mac)
$=WriteProfileString($InvFile,"Network","Location",$location)
$=WriteProfileString($InvFile,"Network","City",$city)
$=WriteProfileString($InvFile,"Network","PING_Loopback",$pingloop)
$=WriteProfileString($InvFile,"Network","PING_Gateway",$pinggate)
$=WriteProfileString($InvFile,"Network","PING_FDHCMail",$pingmail)
$=WriteProfileString($InvFile,"Network","PING_Proxy",$pingproxy)
$=WriteProfileString($InvFile,"Network","PING_Internet",$pinginet)

$=WriteProfileString($InvFile,"Hardware","SerialNumber",$SerNo)
$=WriteProfileString($InvFile,"Hardware","AHCATag",$Asset)
$=WriteProfileString($InvFile,"Hardware","ComputerName",@wksta)
$=WriteProfileString($InvFile,"Hardware","Make",$Make)
$=WriteProfileString($InvFile,"Hardware","Model",$Model)
$=WriteProfileString($InvFile,"Hardware","Case",$Case)
$=WriteProfileString($InvFile,"Hardware","BIOS Ver",$Biosv)
$=WriteProfileString($InvFile,"Hardware","BIOS Date",$Biosd)
$=WriteProfileString($InvFile,"Hardware","ProcessorSpeed",$CPUsp)
$=WriteProfileString($InvFile,"Hardware","HDSize",$hdGB)
$=WriteProfileString($Invfile,"Hardware","MBFree",$hdmbfr)
$=WriteProfileString($Invfile,"Hardware","Memory",$memory)
$=WriteProfileString($Invfile,"Hardware","Dimm0",$dimm0)
$=WriteProfileString($Invfile,"Hardware","Dimm1",$dimm1)
$=WriteProfileString($Invfile,"Hardware","Dimm2",$dimm2)
$=WriteProfileString($Invfile,"Hardware","Printer",$printer)
$=WriteProfileString($Invfile,"Hardware","Modem",$modem)
$=WriteProfileString($Invfile,"Hardware","Video",$video)

$=WriteProfileString($Invfile,"Software","OS",@producttype)
$=WriteProfileString($Invfile,"Software","SP",@csd)
$=WriteProfileString($Invfile,"Software","Hotfixes",$hotfix)
$=WriteProfileString($Invfile,"Software","MSAccess",$access)
$=WriteProfileString($Invfile,"Software","MSExcel",$excel)
$=WriteProfileString($Invfile,"Software","MSOutlook",$outlook)
$=WriteProfileString($Invfile,"Software","MSPowerpoint",$powerpnt)
$=WriteProfileString($Invfile,"Software","MSPublisher",$pub)
$=WriteProfileString($Invfile,"Software","MSWord",$word)
$=WriteProfileString($Invfile,"Software","InternetExplorer",$ier)
$=WriteProfileString($Invfile,"Software","McAfeeVersion",$vscanver)
$=WriteProfileString($Invfile,"Software","McAfeeEngine",$vscaneng)
$=WriteProfileString($Invfile,"Software","McAfeeDAT",$vscandat)
$=WriteProfileString($Invfile,"Software","Impromptu",$Impver)
$=WriteProfileString($Invfile,"Software","AspenFiletime",$asefiletime)
$=WriteProfileString($Invfile,"Software","AdobeAcrobat",$acrobat)



del @scriptdir +'\'+ $SerNo +'.txt'
shell 'cmd /c dir c:\*.exe /b /s > "'+@scriptdir+'"\current.txt'
$whiteDirs = ReadFile(@scriptdir + '\whitedir.txt')
$whitelist = ReadFile(@scriptdir + '\whitelist.txt')
$currentfile=ReadFile(@scriptdir + '\current.txt')
for each $file in $CurrentFile
$match = ascan($whitelist, $file)
if $match = -1 and len($file) > 1
$result = $result + chr(10) + $file
endif
next
$output = split(substr($result,2),chr(10))
$result = ''
for each $file in $output
$tag = 0
for each $dir in $whitedirs
if len($dir) > 1
if instr($file,$dir)
$tag = 1
endif
endif
next
if not $tag
$result = $result + chr(10) + $file
endif
next
$final = split(substr($result,2),chr(10))
del @scriptdir +'\current.txt'
del @scriptdir +'\'+ $SerNo +'.txt'
writefile(@scriptdir +'\'+ $SerNo +'.txt',$final)

$files = readfile(@scriptdir +'\'+ $SerNo +'.txt')
$lines=Ubound($files)
Dim $output[$lines]
For $Loop = 0 to $lines-1
$thisfile = $files[$Loop]
If Exist($thisfile)
$path = Left($thisfile,InStrRev($thisfile,'\'))
$exe = SubStr($thisfile,InStrRev($thisfile,'\')+1)
$ver = GetFileVersion($thisfile)
$name = GetFileVersion($thisfile,"ProductName")
$=writeprofilestring(@scriptdir +'\'+ $SerNo +'_Software.ini',join(split($path,' '),'_'),$exe,$ver + chr(9) + $name)
EndIf
Next
del @scriptdir +'\'+ $SerNo +'.txt'
EndFunction




Return

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#139337 - 2005-10-24 10:29 PM Re: My Computer Info - for Help Desk use PART 4
bofh71 Offline
Fresh Scripter

Registered: 2005-09-26
Posts: 11
Loc: Denmark
@ NTDOC
Thanks for a great script, it's truly amazing.! what it does is actually what my technicians have done manually over the years (sad but true), once a each Quarter my techs have to do this over again and again as some of the techs tends to forget the true meaning of an updated inventory list.. with this script we can start to eliminate going to each PC in our district 1100+ PC's, of course it will still be a task looking into and verifying all the HTM' files collected upon logon (it has become a part of our login script and are stored to a share on a server) what i would like is store the output from your script into a single line txt file so this could be loaded into a DB either Access or SQL automaticly.. the ideal solution would of couse be if this script could output directly into a SQL DB, but i can understand that it is time consuming to do all requests especially the request of putting into SQL.! )
I have tried myself to manipulate your script to behave the way i would like it to and some of the way it works to.. i have removed all htm related stuff and line feeds in hope of the output ended up in a single line, it does end up as i wont, but then it is only the internal kix macros that are displayed in the file and the homegrown variables you have made is not displayed with the values it should but are shown as the variable names..

@ Radimus
1st. link in your signature does not work ;o)
2nd. Your additions/altering to NTDOC's script lead me a litle further in my quest of output to a txt file, one comment though..
I have a IBM T30 laptop with 3 netcards (as follows)
Intel Pro 10/100 (build in )
Symbol PCMCIA WiFi
AGN Virtual netcard (comes as a part of AT&T global network, does not get an IP, subnet etc.)
When running your script it list only the AGN virtual netcard, but i run COMPINFO3 it list the active netcard when writting this from a bed in my hotel it is the WiFi card, is it possible to list all netcards or at least the active one ??

Rgds
Jan V.

BTW. this is my first post..

Top
#139338 - 2005-10-26 12:46 AM Re: My Computer Info - for Help Desk use PART 4
bofh71 Offline
Fresh Scripter

Registered: 2005-09-26
Posts: 11
Loc: Denmark
Don't mind replying to my questions, found a solution to creating the txt output (just needed to look at the code again ), next step for me would be to output/input to SQL
Top
#139339 - 2006-03-24 04:18 PM Re: Can you add a Feature
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
Quote:

I'm working on a KF client tool something like this



It runs in the tray and it can't be closed (except by ending task)

It will run the inventory automatically about 30 minutes after start, or manually upon clicking the refresh button

The Help button will open a subform with contact info for helpdesk.

etc... Still under development




Just pondering - Any progress on that client? =)
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#139340 - 2006-03-24 04:52 PM Re: Can you add a Feature
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
yes and no.

I have seperated it into 2 projects.

1 that just inventories the PC and logs to ini file. Then the logon script kicks off a process to update the client files and upload the inventory to server share

2 is a tray object that will view the inventory.ini and other misc features that a user might be interested in


Part 1 is in my production environment.

Part 2 probably works, but I haven't worked on it for a couple of months. I have wanted to get back to it, I just haven't gotten around to it.

@ Jan V: I know.. I am currently moving providers and am setting up a subdomain for kix. The domain is active, I just haven't built the content yet. http://kixtart.radprojects.net
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#139341 - 2006-07-19 06:43 PM Re: Can you add a Feature
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
doc, just an fyi.
ran your code on some machines and they all returned some trash.
everything before display adapter was gone, etc...

could there be string length issue in your code or just an bug?

Top
#139342 - 2006-07-19 07:45 PM Re: Can you add a Feature
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
Probably due to improper initialization of an array. You probably got back no data, but since I didn't initialize the array it probably messed up a lot of other data returns.

I know you were under the gun to get something done so can't really help you out, but I'll try to take a go through the code again within the next couple weeks.

Top
#139343 - 2006-07-19 07:49 PM Re: Can you add a Feature
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I got lot of table data back but as the start was "gone", there was no layout what so ever in it.

I managed to rip together some stuff from my old invent code that was based on your compinfo3, iirc.

Top
#139344 - 2006-07-19 07:56 PM Re: Can you add a Feature
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
Yeah, sounds like my fault for not initializing an array.
I never ran into it but someone else complained about the
same thing a long time ago. I fixed it, but then along the
way I copied/pasted old code with new code and along with
new updates I probably never completely got all the code
setup correctly.

Sorry guy.

Top
#139345 - 2006-07-19 07:59 PM re: mycompinfo4
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
anyways, I think I need to try again that html tree thingie as the pslist and such are bloating the page too much.
need to make it leaner.

Top
#139346 - 2006-07-20 01:24 PM Re: re: mycompinfo4
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
Jooel, perhaps you can handle it as a personal golf-challenge?
Top
#139347 - 2006-07-20 01:42 PM Re: re: mycompinfo4
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, the html tree version is working fine.
just need to add the pieces there... some day.

Top
#139348 - 2006-08-16 01:56 AM Re: Can you add a Feature
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
Added a screen shot of a possible Webpage layout for
using the script as is to the 1st post.

So is anyone still interested in this type of script?

I know Rad and Jooel want it in a different format - not really sure what the .ini approach buys you Rad unless you use it to import into something else, if that's the case then why not just create it to that format in the first place?

What methods of output do most prefer?

I know the BEST answer is a database, but I don't really have enough free time right now to work on something generic enough to post a full solution for that method.

Or if little or no interest then I'll not bother to update anymore. My web stats show that it is downloaded about 70 times a month for past few months but that doesn't mean anyone is actively using it

Top
#139349 - 2006-08-16 07:48 AM Re: Can you add a Feature
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I'm using the older version as the new one never really worked.

anyways, updated version needs to be established with working info.
like this one, the old ones reported bad info as well.

and shortening the html section to less than 20 lines should be one of the first priorities.
now the code is too bloated.

Top
#139350 - 2006-09-01 07:05 AM Re: Can you add a Feature
JTT Offline
Fresh Scripter

Registered: 2002-10-14
Posts: 32
Loc: Utah
Doc I'm interesting in the script. I actually ran an older version in the past and modified the code to place the HTML files on a share on our server. I am now looking for an inventory script that will place the inventory in an SQL database that we could write queries against and generate reports. Unfortunately my database skills are not what I think is required as it has been several years since I've really done any database work.

Don't think your efforts are not appreciated, I've learned a lot just reading many posts and wish I had more time to spend in the forums but as a consultant I have my hands in a little of everything for many clients so most my visits are when I have a project that I think I can do with Kix to help me accomplish.

Top
#139351 - 2006-09-01 08:13 AM Re: Can you add a Feature
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
oh, my words exactly.
but I don't think myself as an consultant, a life sucking being that...

Top
#139352 - 2006-09-02 12:32 AM Re: Can you add a Feature
bofh71 Offline
Fresh Scripter

Registered: 2005-09-26
Posts: 11
Loc: Denmark
Hey Doc, here's a few answers to your questions.!

Quote:

So is anyone still interested in this type of script?



Yes indeed.! i have learned a bunch just by reading into this script.!
We are running this script via the login script (if older than 5 days it will run and store centrally) have also added monitor lookup (model and serialnumber) helps my techs doing basic inventory check.

Quote:

What methods of output do most prefer?



As you write DB would the best.. at the time being we are using your HTML just for quick lookups.. what i have done as you can read in a previous reply is to strip the output down to a "~" seperated txt files (split into 3 files, HW+SW+Monitor.. all the files carry the PC-Name and Serial so they can be linked) these txt files are then merged and loaded into an excel file at the time being.. what i would love is function for loading the files into SQl (either automaticly or manually)
Ooops, just got carried away..
1. DB would be perfeect
2. TXT/INI
3. HTML

Quote:

Or if little or no interest then I'll not bother to update anymore.



IMHO i think that it would be a petty if no further updates comes along, my technicians and I really appreciate the work you have put into this project.!

on a side note: we are also using this script with BeyondExec to run it on remote PC's and it works like a charm (except for a few PC's where it does not output anything, can't figure out why that is)

Rgds
Jan V.

Top
#139353 - 2006-09-02 01:14 AM Re: Can you add a Feature
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
Thanks for the feedback / input.

I'm currently investigating doing a MySQL database method.
Since the initial database input would require a LOAD statement I will need to come up with some method to save all the data in an appropriate TEXT file method.

As I get time I'll update the script to that format which then should be able to be used for other purposes.

The .ini is good for individual lookups but I don't think is well suited for MySQL or even MS-SQL (though I'm not a database programmer). The .ini might be good though for INSERT and UPDATE operations - will have to investigate further.



I'm using / testing MySQL 5 for this. I doubt that I'll use anything special for it so probably whatever I come up with should work for MySQL 4.x as well.

For those of you using MS-SQL I can't guarantee but hopefully will designed to work with it as well.
MS-SQL is too expensive for general use and MySQL has matured to a pretty high level now days and still remains free (though with little support, there forum is NOT like Korg) you can get support but naturally have to pay which I'm not going to do.


For those interested - Stay tuned....

Top
#173920 - 2007-02-14 08:38 PM Re: Can you add a Feature [Re: NTDOC]
mrhodes Offline
Fresh Scripter

Registered: 2006-05-24
Posts: 8
is there a new link to download this code? the current is no longer working... cant wait to see the newest build you will have NTDOC!
Top
Page 3 of 4 <1234>


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

Who's Online
0 registered and 700 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.125 seconds in which 0.077 seconds were spent on a total of 13 queries. Zlib compression enabled.

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