NTDOCAdministrator
(KiX Master)
2005-05-07 01:24 AM
My Computer Info for Helpdesk use Part 4

Here is an updated version of the My Computer Info script.

KiXhelp home page

Download MyComputerInfo Script 4

Script last updated 5:51 PM 10/4/2005
Note that this version may have an error in the array code that needs to be corrected.

This is a complete re-write of the code, smaller, faster, and corrects or adds information from comments in the thread on
the last version.

  • Now includes requests such as:
  • Model
  • Mapped Printer info
  • Mapped Drive info
  • Home folder
  • Password age info
  • Single write to file for improved speed at end of log
  • Checks for WMI and quits if error detected


Previous Versions:
My Computer Info for Helpdesk use Part 2
Fri Oct 24 2003
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=164083

My Computer Info for Helpdesk use Part 3
Fri Apr 09 2004
http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Number=116475

Here is a bit different idea and method that Jooel and I were working on a while back.
Work in progress by Lonkero for the Helpdesk / Computerinfo script. buildHTMLtree()
Sun Oct 24 2004
http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Number=127432

Mail the Software Inventory - Placing data into Excel
Wed Apr 07 2004
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=116337




And here is a screen shot of an example Website that can be automatically
created and updated on a schedule with KiXtart and scheduler.





mole
(Getting the hang of it)
2005-05-07 01:52 PM
Re: My Computer Info - for Help Desk use PART 4

Thanks very much for this Doc, its fantastic.

mole


ADynes
(Starting to like KiXtart)
2005-06-10 09:25 PM
Re: My Computer Info - for Help Desk use PART 4

Quote:

Thanks very much for this Doc, its fantastic.



+1

Only thing I changed was I added a variable to turn on and off the display at the end and a variable for .htm file location so I can run it through login and have it place the file onto the server and not alert the user. Really great script, thanks.


LonkeroAdministrator
(KiX Master Guru)
2005-06-11 11:37 AM
Re: My Computer Info - for Help Desk use PART 4

oh that bloated html code... oh oh...

[edit]
doc, do you happen to have that treeview code?
haven't been able to find it lately...


NTDOCAdministrator
(KiX Master)
2005-06-11 05:57 PM
Re: My Computer Info - for Help Desk use PART 4

Hmmmm.... nice that you have such nice things to say Lonk

Anyways... the code we were working on in the past is located here on the board.

buildHTMLtree()
 


LonkeroAdministrator
(KiX Master Guru)
2005-06-11 06:19 PM
Re: My Computer Info - for Help Desk use PART 4

you must know that I can't say my comments "seriously" but do say them seriously-smiling.

estradac
(Fresh Scripter)
2005-07-12 05:40 PM
Can you add a Feature

Can someone assist me in adding a couple of features

1. Send the results to a central location Shared drive based on Comuter name\user name
2. Include a link to send via lotus notes and or outlook email (will be used to send information to my Helpdesk)
3. Print option on top of html page


LonkeroAdministrator
(KiX Master Guru)
2005-07-12 06:36 PM
Re: Can you add a Feature

lol...
I knew this was coming.

estradac, we could assist but don't see no thread by you where you state you have initiated this.
can't help if can't know in which to help.


estradac
(Fresh Scripter)
2005-07-12 07:18 PM
Re: Can you add a Feature

Huh I'm a newbie. What do I need to do?

estradac
(Fresh Scripter)
2005-07-12 07:34 PM
Re: Can you add a Feature

Oh yeah one more. Is there any possibility to add the output to a SQL or access database. This is truly an awesome script which can be improved to help administrators.

LonkeroAdministrator
(KiX Master Guru)
2005-07-12 07:40 PM
Re: Can you add a Feature

what you need to do?
lol.

be involved!


estradac
(Fresh Scripter)
2005-07-12 07:49 PM
Re: Can you add a Feature

Alright amigo. I can assist with how to send emial via lotus notes but I don't know how to add this to the code...

Call SendNotesMail( "this is a test subject" , "C:\Temp\NotesSendMail.vbs" , "Mr.Estradac","my message" , True)
Sub SendNotesMail(Subject , Attachment , Recipient , BodyText , SaveIt )
'Set up the objects required for Automation into lotus notes
Dim Maildb 'The mail database
Dim UserName 'The current users notes name
Dim MailDbName 'THe current users notes mail database name
Dim MailDoc 'The mail document itself
Dim AttachME 'The attachment richtextfile object
Dim Session 'The notes session
Dim EmbedObj 'The embedded object (Attachment)
'Start a session to notes
Set Session = CreateObject("Notes.NotesSession")
'Get the sessions username and then calculate the mail file name
'You may or may not need this as for MailDBname with some systems you
'can pass an empty string
UserName = Session.UserName
MailDbName = Left(UserName, 1) & Right(UserName, (Len(UserName) - InStr(1, UserName, " "))) & ".nsf"
'Open the mail database in notes
Set Maildb = Session.GETDATABASE("", MailDbName)
'Set Maildb = Session.GETDATABASE("", "mail.box")
If Maildb.ISOPEN = True Then
'Already open for mail
Else
Maildb.OPENMAIL
End If
'Set up the new mail document
Set MailDoc = Maildb.CREATEDOCUMENT
MailDoc.Form = "Memo"
MailDoc.sendto = Recipient
MailDoc.Subject = Subject
MailDoc.Body = BodyText
MailDoc.SAVEMESSAGEONSEND = SaveIt
'Set up the embedded object and attachment and attach it
If Attachment <> "" Then
Set AttachME = MailDoc.CREATERICHTEXTITEM("Attachment")
Set EmbedObj = AttachME.EMBEDOBJECT(1454, "", Attachment, "Attachment")
'MailDoc.CREATERICHTEXTITEM ("Attachment")
End If
'Send the document
MailDoc.SEND 0, Recipient
'Clean Up
Set Maildb = Nothing
Set MailDoc = Nothing
Set AttachME = Nothing
Set Session = Nothing
Set EmbedObj = Nothing
End Sub

'~~[/script]~~


LonkeroAdministrator
(KiX Master Guru)
2005-07-12 08:39 PM
Re: Can you add a Feature

well, you really can't as that's no kixtart code.
but, to remind you, you yourself said:
Quote:

Can someone assist me in adding a couple of features




in english, can we assist you to when you add these features.
now, like I said.
we can.
just hope you input some effort of your own instead of saying "I'm a newbie, give me your weapons"


NTDOCAdministrator
(KiX Master)
2005-08-26 11:30 AM
Re: My Computer Info - for Help Desk use PART 4

A bit too busy to update the code right now, but will try to add one of the IP UDFs to give the other NIC values which was recently requested.

As for the multiple requests I get to put this into SQL or MySQL - sorry but I don't have time to really setup a full fledged script and documentation on how to write all of this to a database. Search the board as there are UDFs and others have done similar, but will require some reading and experimenting to complete it.

If there are requests for other data to be added to the script please let me know and I'll try to add it as time allows.


NTDOCAdministrator
(KiX Master)
2005-10-05 03:54 AM
Re: My Computer Info - for Help Desk use PART 4

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.

There were too many e-mails to me asking for such that I've switched the script over to e-mail only. However you can easily remark out the send and have it launch locally as before if wanted.

The script now includes a MessageBox to let the user know the script is being e-mailed to Support. That to can be disabled if wanted.


; *********************************************
; ******** REVISION HISTORY ******************
; 2.01 *** 10/4/2005 6:02PM - By NTDOC
; ******** Modified to send to Admins as requested via e-mail using BLAT
; ******** DOWNLOAD BLAT: http://www.blat.net
; ******** Removed trailing decimal numbers from FREE SPACE.
; ******** Switched out GetIEVersion with GetIEVersion2 (previous udf was broken)
; ******** Added the $SO=SetOption('NoMacrosInStrings','On') option to the script
; ******** Renamed the script to: COMPINFO3.KIX

Please let me kow if anything got broken in this update or not. It appears to work well so far in my testing.

The zip file also includes a script to add a shortcut to the users Start Menu for requesting help.

Download MyComputerInfo script
 


NTDOCAdministrator
(KiX Master)
2005-10-05 08:38 AM
Re: Can you add a Feature

Quote:

Include a link to send via lotus notes and or outlook email (will be used to send information to my Helpdesk)




 
Well it now sends via BLAT e-mail by default, but you could add an Outlook mailer instead if you want, it just won't be silent and the client must have Outlook installed and a profile setup already.
 

Code:
Function SendOutlookMail($To, $Subject, optional $Body, optional $Attachment)
Dim $objOutlook, $Msg, $Recip, $Attach, $Deliver
$objOutlook = CreateObject("Outlook.Application")
$Msg = $objOutlook.CreateItem(0)
$Msg.Subject = ($Subject)
$Msg.Body = ($Body + @CRLF)
$Recip = $Msg.Recipients.Add($To)
If Not $Recip.Resolve
$Msg.Display
EndIf
$Attach = $Msg.attachments.add($Attachment)
$Msg.Display
; $Deliver = $Msg.Send
$objOutlook = ""
EndFunction


 
As for the print, well there are methods to accomplish that as well if needed, just reply back.


Radimus
(KiX Supporter)
2005-10-05 11:30 PM
Re: Can you add a Feature

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


Radimus
(KiX Supporter)
2005-10-06 02:18 AM
Re: Can you add a Feature

I'm also thinking of adding a messaging component to it to retrieve possible messages from a a file on a share... something like a messagebox that pops up but requires 2 action to close the window and will log the OKs to a central file.

Something like a message that says "Mail server will be down at 3:00 today". saved as a file, then at some incremental time (10-15 minutes or so) it will read the file, display to the user in a KF textbox, and require a chekbox and a click to OK it, then log to an ini or something the time and username.

More reliable than a net send
more 'in your face' than an email

Suggestions??


NTDOCAdministrator
(KiX Master)
2005-10-06 04:38 AM
Re: Can you add a Feature

Sounds and looks like a good idea. I'd go ahead and start a new post with this though and some code if you're ready to beta test it.

High end would be to store it back to SQL, but might be overkill for most shops.


Co
(MM club member)
2005-10-06 11:43 AM
Re: Can you add a Feature

Maybe SQL is overkill but storing the information in a database is really a good idea. You could use this information for an audit on the CMDB

Radimus
(KiX Supporter)
2005-10-06 11:58 AM
Re: Can you add a Feature

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


JST
(Fresh Scripter)
2005-10-09 07:44 PM
Re: My Computer Info - for Help Desk use PART 4

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%.


Les
(KiX Master)
2005-10-09 07:51 PM
Re: My Computer Info - for Help Desk use PART 4

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.





NTDOCAdministrator
(KiX Master)
2005-10-09 11:40 PM
Re: My Computer Info - for Help Desk use PART 4

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.


JST
(Fresh Scripter)
2005-10-10 01:01 AM
Re: My Computer Info - for Help Desk use PART 4

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


LonkeroAdministrator
(KiX Master Guru)
2005-10-10 02:27 AM
Re: My Computer Info - for Help Desk use PART 4

the easy way to get rid of the blat is to comment the line:
Code:

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



NTDOCAdministrator
(KiX Master)
2005-10-10 09:17 AM
Re: My Computer Info - for Help Desk use PART 4

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



gilbertng
(Fresh Scripter)
2005-10-10 07:53 PM
Re: My Computer Info - for Help Desk use PART 4

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


Mart
(KiX Supporter)
2005-10-10 08:32 PM
Re: My Computer Info - for Help Desk use PART 4

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.


NTDOCAdministrator
(KiX Master)
2005-10-10 09:00 PM
Re: My Computer Info - for Help Desk use PART 4

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


gilbertng
(Fresh Scripter)
2005-10-11 03:08 AM
Re: My Computer Info - for Help Desk use PART 4

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


NTDOCAdministrator
(KiX Master)
2005-10-11 03:55 AM
Re: My Computer Info - for Help Desk use PART 4

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.

 


NTDOCAdministrator
(KiX Master)
2005-10-11 03:56 AM
Re: My Computer Info - for Help Desk use PART 4

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


Radimus
(KiX Supporter)
2005-10-11 09:57 PM
Re: My Computer Info - for Help Desk use PART 4

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



gilbertng
(Fresh Scripter)
2005-10-12 05:03 AM
Re: My Computer Info - for Help Desk use PART 4

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


NTDOCAdministrator
(KiX Master)
2005-10-12 05:16 AM
Re: My Computer Info - for Help Desk use PART 4

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?


NTDOCAdministrator
(KiX Master)
2005-10-12 05:16 AM
Re: My Computer Info - for Help Desk use PART 4

Thanks Rad,

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


gilbertng
(Fresh Scripter)
2005-10-12 10:54 AM
Re: My Computer Info - for Help Desk use PART 4

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!


NTDOCAdministrator
(KiX Master)
2005-10-12 06:35 PM
Re: My Computer Info - for Help Desk use PART 4

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?


NTDOCAdministrator
(KiX Master)
2005-10-14 01:56 AM
Re: My Computer Info - for Help Desk use PART 4

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.


Radimus
(KiX Supporter)
2005-10-20 05:54 PM
Re: My Computer Info - for Help Desk use PART 4

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:




Radimus
(KiX Supporter)
2005-10-20 06:13 PM
Re: My Computer Info - for Help Desk use PART 4

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



bofh71
(Fresh Scripter)
2005-10-24 10:29 PM
Re: My Computer Info - for Help Desk use PART 4

@ 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..


bofh71
(Fresh Scripter)
2005-10-26 12:46 AM
Re: My Computer Info - for Help Desk use PART 4

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

Björn
(Korg Regular)
2006-03-24 04:18 PM
Re: Can you add a Feature

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? =)


Radimus
(KiX Supporter)
2006-03-24 04:52 PM
Re: Can you add a Feature

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


LonkeroAdministrator
(KiX Master Guru)
2006-07-19 06:43 PM
Re: Can you add a Feature

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?


NTDOCAdministrator
(KiX Master)
2006-07-19 07:45 PM
Re: Can you add a Feature

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.


LonkeroAdministrator
(KiX Master Guru)
2006-07-19 07:49 PM
Re: Can you add a Feature

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.


NTDOCAdministrator
(KiX Master)
2006-07-19 07:56 PM
Re: Can you add a Feature

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.


LonkeroAdministrator
(KiX Master Guru)
2006-07-19 07:59 PM
re: mycompinfo4

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.


Björn
(Korg Regular)
2006-07-20 01:24 PM
Re: re: mycompinfo4

Jooel, perhaps you can handle it as a personal golf-challenge?

LonkeroAdministrator
(KiX Master Guru)
2006-07-20 01:42 PM
Re: re: mycompinfo4

well, the html tree version is working fine.
just need to add the pieces there... some day.


NTDOCAdministrator
(KiX Master)
2006-08-16 01:56 AM
Re: Can you add a Feature

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


LonkeroAdministrator
(KiX Master Guru)
2006-08-16 07:48 AM
Re: Can you add a Feature

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.


JTT
(Fresh Scripter)
2006-09-01 07:05 AM
Re: Can you add a Feature

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.


LonkeroAdministrator
(KiX Master Guru)
2006-09-01 08:13 AM
Re: Can you add a Feature

oh, my words exactly.
but I don't think myself as an consultant, a life sucking being that...


bofh71
(Fresh Scripter)
2006-09-02 12:32 AM
Re: Can you add a Feature

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.


NTDOCAdministrator
(KiX Master)
2006-09-02 01:14 AM
Re: Can you add a Feature

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....


mrhodes
(Fresh Scripter)
2007-02-14 08:38 PM
Re: Can you add a Feature

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!

PeckMan
(Fresh Scripter)
2007-05-22 03:19 PM
Re: Can you add a Feature

I'm also very interested to have a look at this 'MyComputerInfo Script 4'.
Is there anywhere an alternative download link because the link on page 1 is down.


NTDOCAdministrator
(KiX Master)
2007-05-22 06:44 PM
Re: Can you add a Feature

I have updated the download link

NTDOCAdministrator
(KiX Master)
2008-01-20 11:33 AM
Re: Can you add a Feature

Restored missing picture from the 1st post on page 1

SoCi0pAtH
(Fresh Scripter)
2008-04-30 06:16 PM
Re: Can you add a Feature

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

----------------------------------------------------------------

Any news on this?


Darren_W
(Hey THIS is FUN)
2009-06-10 06:07 PM
Re: Can you add a Feature

Hi,

I'm using this script on my network, and I've noticed that it does not always retrieve the path to the program for installed software, is this a bug or is it unable to get the paths. What I am trying to do is get the sizes of the packages by interrogating the path the exe resides in.


Darren


NTDOCAdministrator
(KiX Master)
2009-06-12 04:08 AM
Re: Can you add a Feature

Well it could very well be a bug, or you could be running it on a Vista box which did not exist when the script was last updated, or you may be using KiXtart 4.6x which has some known issues.

Script last updated 5:51 PM 10/4/2005


Ashpoint
(Starting to like KiXtart)
2009-06-13 10:59 PM
Re: Can you add a Feature

From both71:

<<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.
>>

Would certainly like to see the code for this.