Page 2 of 4 <1234>
Topic Options
#139315 - 2005-10-06 11:58 AM Re: Can you add a Feature
Radimus Moderator Offline
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
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#139316 - 2005-10-09 07:44 PM Re: My Computer Info - for Help Desk use PART 4
JST Offline
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
#139317 - 2005-10-09 07:51 PM Re: My Computer Info - for Help Desk use PART 4
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Check your email.
Quote:

NOTICE: This script is no longer set to just show on the user's desk. The script has been modified to ONLY e-mail the file back to an Administrator via BLAT SMTP e-mailer.



_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#139318 - 2005-10-09 11:40 PM Re: My Computer Info - for Help Desk use PART 4
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
It should be reasonably well noted where you need to modify settings in the script. I've marked most if not all locations with MODIFY to your environment requirements.

You need to download and make available BLAT.EXE the SMTP e-mailing application. You need to setup the locations and names of where it finds BLAT and the name/IP of your SMTP server, etc...

Please review the script - don't just try to run it.

After reviewing the script if you need more assistance please let me know.

Top
#139319 - 2005-10-10 01:01 AM Re: My Computer Info - for Help Desk use PART 4
JST Offline
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
#139320 - 2005-10-10 02:27 AM Re: My Computer Info - for Help Desk use PART 4
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
the easy way to get rid of the blat is to comment the line:
Code:

$Send = BlatMailer($Recipients,@USERID+'@@mycompany.com',$Subject,$Body,$HTMLLog)

_________________________
!

download KiXnet

Top
#139321 - 2005-10-10 09:17 AM Re: My Computer Info - for Help Desk use PART 4
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
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 Offline
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
#139323 - 2005-10-10 08:32 PM Re: My Computer Info - for Help Desk use PART 4
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
Well to see if WMI is installed and accessable you could use this UDF ConfirmWMI() - Confirm access and version of WMI
Each Win2K and up box should have WMI installed by default.


Edited by Mart (2005-10-10 08:33 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#139324 - 2005-10-10 09:00 PM Re: My Computer Info - for Help Desk use PART 4
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
The ConfirmWMI UDF is part of the script already.

Even though WMI is already installed and part of 2000/XP by default it can easily be damaged and may need to be repaired.


WMI is not working. How do I troubleshoot this?
http://www.microsoft.com/technet/scriptcenter/resources/wmifaq.mspx#EHAA

Repairing and re-registering the WMI
http://windowsxp.mvps.org/repairwmi.htm

Top
#139325 - 2005-10-11 03:08 AM Re: My Computer Info - for Help Desk use PART 4
gilbertng Offline
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
#139326 - 2005-10-11 03:55 AM Re: My Computer Info - for Help Desk use PART 4
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
I'm not sure. Can you start your own post and reference this thread. Then post the full code you're using within the CODE TAGS to preserve formatting and we can take a look to see if we find anything obvious.

 

Top
#139327 - 2005-10-11 03:56 AM Re: My Computer Info - for Help Desk use PART 4
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
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 Offline
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)
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#139329 - 2005-10-12 05:03 AM Re: My Computer Info - for Help Desk use PART 4
gilbertng Offline
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
#139330 - 2005-10-12 05:16 AM Re: My Computer Info - for Help Desk use PART 4
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
When I get time I'll look and review the code again. The old code screwed up the array if it had a blank element returned and then screwed up the html output. Thought I fixed all that with the help of Bryce though a while ago but I might have put back some old code accidentally.

What version of the code are you using? Recently downloaded within past coule days?

Top
#139331 - 2005-10-12 05:16 AM Re: My Computer Info - for Help Desk use PART 4
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Thanks Rad,

Will try to take a look either later tonight, or some time tomorrow.

Top
#139332 - 2005-10-12 10:54 AM Re: My Computer Info - for Help Desk use PART 4
gilbertng Offline
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
#139333 - 2005-10-12 06:35 PM Re: My Computer Info - for Help Desk use PART 4
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Hi Gilbert,

I have no idea what is going on inside your code especially if as you say it works for some and not for others. My guess is that you've broken the Array somehow and on those computers where it doesn't work there is probably missing data. You need to probably correct the array method used.

Not sure why you need to change a variable in the middle. Are you just trying to add more data? If so, what other data do you want that it currently is not getting?

Top
#139334 - 2005-10-14 01:56 AM Re: My Computer Info - for Help Desk use PART 4
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
CRAP CRAP CRAP

Found the problem. Stupidity on my part. I had like 5 different copies of MyComputerInfo script open in the editor and was doing a lot of copy/paste with newer code. Then I saved an OLD version with old code and overwrote the new stuff. Then posted it as the new code.

There is some new stuff there, but it has old HTML code that screws up the array calls on some systems.

I'll work on fixing it back to a proper coded method and see if I can incorporate Rads ideas as well.

Top
Page 2 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 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.053 seconds in which 0.017 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