#139315 - 2005-10-06 11:58 AM
Re: Can you add a Feature
|
Radimus
Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
I'm thinking of 2 components now... 1: is a service that will run the inventory (admin privileges) 2: is the GUI user component that displays the data collected from the inventory and the user/network data.
WMI is a pain for non-admin users
|
Top
|
|
|
|
#139316 - 2005-10-09 07:44 PM
Re: My Computer Info - for Help Desk use PART 4
|
JST
Fresh Scripter
Registered: 2004-08-26
Posts: 8
|
What do I need to do to see the result? I've attempted to run this (WinXPsp2 Kix Ver 4.51): kix32 compinfo3.kix or wkix32 compinfo3.kix
I get "Support Request" message box, click OK - NOTHING. No htm file under %temp%.
|
Top
|
|
|
|
#139319 - 2005-10-10 01:01 AM
Re: My Computer Info - for Help Desk use PART 4
|
JST
Fresh Scripter
Registered: 2004-08-26
Posts: 8
|
NTDoc, I'd like not to use BLAT.exe, but just generate and examine the file. I'll attemp to modify the script so it generates the file insted of sending it thru mail.
It would of been nice to have this as an option thru a variable or a prompt.
Thanks
|
Top
|
|
|
|
#139321 - 2005-10-10 09:17 AM
Re: My Computer Info - for Help Desk use PART 4
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11624
Loc: CA
|
Use something like the old version had.
Code:
$HTMLLog = '%TEMP%\' + @WKSTA + '.HTM' $Explorer = ReadValue($HKLMSMWCVAP + '\IEXPLORE.EXE','')
; ********************************************* ; ********* MAIN SCRIPT ***************** ; ********************************************* $StopTime = @TICKS $ScriptRunTime = $StopTime-$StartTime If Exist($HTMLLog) Del $HTMLLog EndIf RecordHTMLLogon()
If Exist($HTMLLog) RUN $Explorer + ' ' + $HTMLLog EndIf Quit @ERROR
|
Top
|
|
|
|
#139322 - 2005-10-10 07:53 PM
Re: My Computer Info - for Help Desk use PART 4
|
gilbertng
Fresh Scripter
Registered: 2005-02-02
Posts: 6
|
First of all thanks for the work of NTDOC.
I found that your script is very good and I have comment out the email part and I just need the html file.
However, I found that in some computer it is work fine but some of the comptuer cannot generate the complete HTML files, is the the problem of WMI, I don't know those computers have started the WMI service or not.
**************************************************** The following is the start of the html files I have test on three Chinese Windows XP SP2, one Windows 2003 server SP1, one Chi WinXPSP2 is okay, the other two get the following incomplete HTML, while the Server is okay
*****************************************************
Quote:
I can't post the html, when I post it, the board display is get problems. I just describe is here, it seems that I get only part of the software information (not all), and I miss USER / ACCOUNT INFORMATION Computer information ANTIVIRUS INFORMATION ........
**********************************************************
Thnaks for you help!
Gilbert Ng
|
Top
|
|
|
|
#139325 - 2005-10-11 03:08 AM
Re: My Computer Info - for Help Desk use PART 4
|
gilbertng
Fresh Scripter
Registered: 2005-02-02
Posts: 6
|
Thanks for your quick reply,
I have test the WMI service and it didn't stop, I think it is not the source of problem, but I still get an incomplete copy of the HTML, how can I figure it out?
Thanks a lot! (I haven't mention that I use kixtart 4.5)
Gilbert
|
Top
|
|
|
|
#139327 - 2005-10-11 03:56 AM
Re: My Computer Info - for Help Desk use PART 4
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11624
Loc: CA
|
For those interested I've posted anothe variation on gathering information and putting it directly into Excel.
Not for everyone, but serves to give ideas at least.
Requires EXCEL be installed on the system running the script.
Mail the Software Inventory Placing data into Excel http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=116337
Edited by NTDOC (2005-10-11 03:57 AM)
|
Top
|
|
|
|
#139328 - 2005-10-11 09:57 PM
Re: My Computer Info - for Help Desk use PART 4
|
Radimus
Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
Hey Doc... been screwing around with the html code...
Code:
$HTMLLog = @scriptdir + '\test.htm' $ImageLocation = ''
$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 ' + @WKSTA +'</title>'+@CRLF +'</head>'+@CRLF +'<body bgproperties="fixed" background="'+$ImageLocation+'">'+@CRLF +'<p>'+@CRLF +'<table border="0" width="25%" id="table1">'+@CRLF +'<tr>'+@CRLF +'<td><font color="#669999" size="4">Details generated by KiXtart ' + @KIX + '</font></td>'+@CRLF +'</tr>'+@CRLF +'</table>'+@CRLF +'</p>'+@CRLF
+'<p><b><font size="5" color="#800000">USER / ACCOUNT INFORMATION</font></b></p>'+@CRLF +'<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">'+@CRLF
$color= '#000000','#000000','#ff0000','#000000','#ff0000'
$line = 'Section Title',' ',' ',' ',' ' $wl = $wl + HTMLRow($line, $color)
$line = ' ','element11','element12','element13','element14' $wl = $wl + HTMLRow($line, $color)
$line = ' ','element21','element22','element23','element24' $wl = $wl + HTMLRow($line, $color)
$line = ' ','element31','element32','element33','element34' $wl = $wl + HTMLRow($line, $color)
$WL = $WL + '</table>'+@CRLF + '</body>'+@CRLF + '</html>'+@CRLF
del $HTMLLog
$Handle = FreeFileHandle() $OpenFile = Open($Handle, $HTMLLog,5) $WL = WriteLine($Handle,$WL + @CRLF) $CloseFile = Close($Handle)
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 color="'+$arrColor[$item]+'"><b>'+$arrElements[$item]+'</b></td>'+@CRLF next $HTMLRow = $HTMLRow +' </tr>'+@CRLF Endfunction
Edited by Radimus (2005-10-11 09:59 PM)
|
Top
|
|
|
|
#139329 - 2005-10-12 05:03 AM
Re: My Computer Info - for Help Desk use PART 4
|
gilbertng
Fresh Scripter
Registered: 2005-02-02
Posts: 6
|
I found the raise of the problems (I don't know how this problem raise or the problem of my installed software) Code:
$WL2 = 'pbfont size="5" color="#800000">INSTALLED SOFTWARE/font/b/p'+@CRLF +'table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber6">'+@CRLF +' tr'+@CRLF +' td width="19%" height="19"bfont color="#FF0000"APPLICATION/font/b/td'+@CRLF +' td width="20%" height="19"bfont color="#FF0000"PATH/font/b/td'+@CRLF +' td width="20%" height="19"font color="#FF0000"VERSION/font/b/td'+@CRLF +' td width="20%" height="19"bfont color="#FF0000">PUBLISHER/font/b/td'+@CRLF +' /tr'+@CRLF ; For Each $Item In $MySoftware ; If $Item ; $WL2 = $WL2 + 'tr'+@CRLF+'td height="19">'+Split($Item,"*")[0]+'/td'+'td height="19">'+Split($Item,"*")[1]; +'/td'+'td height="19">'+Split($Item,"*")[2]+'/td'+'td height="19">'+Split($Item,"*")[3]+'/td'+'/tr'+@CRLF
; EndIf ; Next $WL2 = $WL2 + '/table'+@CRLF ? $WL2 ; $WL = $WL + '/table'+@CRLF + '/body'+@CRLF + '/html'+@CRLF
The about code is almost at the end of the script, you can see that I have comment out the portion of "Search Installed Software", it is becuase I found that when I run this portion of sciprt, I found that the the upper part of the HTML like being "ate out".
Note:I have change this variable to $WL2 becuase I just want to test which part get problems. Besides, I have already use "code" tag to post the code, but I just found the display, so I have also remove all the "<>" symbol.
Thanks for your help!
Gilbert
|
Top
|
|
|
|
#139332 - 2005-10-12 10:54 AM
Re: My Computer Info - for Help Desk use PART 4
|
gilbertng
Fresh Scripter
Registered: 2005-02-02
Posts: 6
|
Thanks NTDOC,
; *** File Name: COMPINFO3.KIX ; *** Date Created: 04/09/2004 5:49PM - By NTDOC
I think I have download this which few days ago, should be on last friday.
I have using another variable to store the software info data, then I combine the content back to $WL,like this: Code:
$WL = 'pbfont size="5" color="#800000">INSTALLED SOFTWARE/font/b/p'+@CRLF +'table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber6">'+@CRLF +' tr'+@CRLF +' td width="19%" height="19"bfont color="#FF0000"APPLICATION/font/b/td'+@CRLF +' td width="20%" height="19"bfont color="#FF0000"PATH/font/b/td'+@CRLF +' td width="20%" height="19"font color="#FF0000"VERSION/font/b/td'+@CRLF +' td width="20%" height="19"bfont color="#FF0000">PUBLISHER/font/b/td'+@CRLF +' /tr'+@CRLF ;************************************* For Each $Item In $MySoftware $WL2 = $WL2 +.......... Next ;************************************* $WL2 = $WL2 + '/table'+@CRLF + '/body'+@CRLF + '/html'+@CRLF $WL = $WL + $WL2 <---------- combine the two content
And it is okay, I don't know why it not work when using the orindary script and I am sorry that I haven't investage it.
Thanks for your help!
Edited by gilbertng (2005-10-12 11:05 AM)
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 700 anonymous users online.
|
|
|