Page 1 of 3 123>
Topic Options
#117688 - 2004-04-10 04:25 AM My Computer Info - for Help Desk use PART 3
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
FYI There is an updated version 4 here...
My Computer Info - for Help Desk use PART 4

Here is another updated version of the My Computer Info script that was posted here.
My Computer Info - for Help Desk use PART 2
and the original one here
My Computer Info - for Help Desk use


This new version creates a .HTM file and then launches IE to display it.

The full script returns back more data then is listed here, but the image would be too large to post here.


Script last updated: 04/18/2004 4:26PM

KiXhelp home page


Download MyComputerInfo Script



Top
#117689 - 2004-04-12 02:45 PM Re: My Computer Info - for Help Desk use PART 3
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Doc,

It looks like this does not get any info about the version of Office programs that I have installed. I am running office 2000.

If I do the following, I should be able to get the specifics

Code:

$apppaths='HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\'
$wordver=GETFILEVERSION(READVALUE($apppaths+'\winword.exe',''))



Maybe add in detection for TrendMicro, Avast, Sophos, AVG AV products. I know Symantec and McAfee are the most common.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#117690 - 2004-04-12 06:51 PM Re: My Computer Info - for Help Desk use PART 3
jpg35 Offline
Fresh Scripter

Registered: 2003-08-06
Posts: 27
Loc: SoCal
Script is not picking up my Mcafee, otherwise this script is very cool man. Good work.
Top
#117691 - 2004-04-12 09:36 PM Re: My Computer Info - for Help Desk use PART 3
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
Okay I've updated the code and posted an update. Make sure you flush your cache before attempting to download again.

The file header with the updated version should say

 
; ********** REVISION HISTORY ******************
; 001.03 *** 4/12/2004 11:38AM - By NTDOC

Kent,
I'm pulling back office versions from 97/2000/2002/2003 so far without a problem in our environment.

This code is processing the UNINSTALL keys and the APP PATH keys both. Then attempts to remove duplicates from the list of UNINSTALL if already found in APP PATH.

Found an issue with some EXE files that the BinFileVersion would comeback as 0.0.0.0 so I modified the code to show FileVersion for those cases.

I've also updated the code to show McAfee or None Detected.

Sorry, but I probably will not be adding other AV detection into this script, at least at this time.

Les said that the McAfee did not show for his 7.1 ePO version. I don't have any McAfee AV so can't test. If anyone can test and confirm and/or provide the proper code for McAfee both older and newer versions I'll be glad to update the code with it.

ps. I also corrected a typo that Les alerted me to.


Edited by NTDOC (2004-04-12 09:37 PM)

Top
#117692 - 2004-04-12 10:15 PM Re: My Computer Info - for Help Desk use PART 3
jpg35 Offline
Fresh Scripter

Registered: 2003-08-06
Posts: 27
Loc: SoCal
Got the mcafee part working. What's in red is the changes i've made. Thanks again for the code.

Code:
  Select
Case $McAfeeInfo [0]<>""
$WL = $WL +'<p><b><font size="5" color="#800000">ANTIVIRUS INFORMATION</font></b></p>'+@CRLF
+'<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber3">'+@CRLF
+' <tr>'+@CRLF
+' <td width="20%"><b>ANTIVIRUS PRODUCT VERSION</b></td>'+@CRLF
+' <td width="20%">'+$McAfeeInfo [0]+'</td>'+@CRLF
+' <td width="20%"><b>DAT VERSION</b></td>'+@CRLF
+' <td width="20%">'+$McAfeeInfo [1]+'</td>'+@CRLF
+' </tr>'+@CRLF
+' <tr>'+@CRLF
+' <td width="20%"><b>ENGINE VERSION</b></td>'+@CRLF
+' <td width="20%">'+$McAfeeInfo [2]+'</td>'+@CRLF
+' <td width="20%"><b></b></td>'+@CRLF
+' <td width="20%"></td>'+@CRLF
+' </tr>'+@CRLF
+'</table>'+@CRLF


Top
#117693 - 2004-04-12 10:19 PM Re: My Computer Info - for Help Desk use PART 3
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
LOL

Thanks, yes was just online with Les and found that out.

Guess it was too late when I wrote that up.

I've updated the file and posted it again with the fix and a minor name change as well to show McAfee

File should now read

; ********** REVISION HISTORY ******************
; 001.04 *** 4/12/2004 1:10PM - By NTDOC
; ********** Updatd code to correct McAfee not showing. Was calling an invalid array check.

Top
#117694 - 2004-04-12 10:36 PM Re: My Computer Info - for Help Desk use PART 3
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
I have updated the code in this post to use this revised GetSoftwareInfo() UDF as well.

http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Number=116522

Top
#117695 - 2004-04-16 10:47 AM Re: My Computer Info - for Help Desk use PART 3
Trackz Offline
Fresh Scripter

Registered: 2004-03-18
Posts: 37
Loc: Rotterdam, The Netherlands
Question moved from URL: http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Board=&Number=116337


What I like to know, is:

What is this code doing?

For Each $Key in $App2
$DisplayName = ReadValue($HKLMAppPaths2 + "\" + $Key,'DisplayName')
$DisplayVersion = ReadValue($HKLMAppPaths2 + "\" + $Key,'DisplayVersion')
$DisplayName = IIF(InStr($SoftInfo,$DisplayName),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'ACDSee'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'Adobe Acrobat 6.0'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'Adobe Illustrator'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'Adobe Photoshop 5.5'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'Adobe Photoshop 6.0'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'Adobe Photoshop 7.0'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'Adobe Reader'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'Alcohol 120'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'Dreamweaver MX'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'Fireworks MX'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'Flash MX'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'FreeHand MX'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'LiveReg'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'LiveUpdate'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'MSN Messenger'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'Macromedia FreeHand'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'Microsoft Office FrontPage'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'Microsoft Outlook'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'Net2Phone'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'RoboHelp Office'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'SnagIt'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'Symantec AntiVirus'),'',$DisplayName)
$DisplayName = IIF(InStr($DisplayName,'Windows Media Encoder'),'',$DisplayName)

Some records from $HKLMAppPaths2 = 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall'
don't show up in the output. Trying to find out why.
I tried to add lines to it, but nothing seems to change.

Any explanation?

Tim


Edited by thoek (2004-04-16 10:50 AM)

Top
#117696 - 2004-04-16 08:24 PM Re: My Computer Info - for Help Desk use PART 3
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
Those lines remove duplicate entries.

There are values in the UNINSTALL keys that do not use the keys I'm checking. If the value is BLANK the code says to ignore the value. I didn't want it to just display a name without a version (but if that's what you're looking for it can be modified by you to not ignore blanks)

DisplayName and DisplayVersion

Without creating a much more complex script I just don't see how to obtain EVERY entry there is. Some of the values in the UNINSTALL and APP PATHS keys just don't have enough information to tell you about the application.

If you need more information then you'll have to try something like Microsoft SMS or help me to make this script better by explaning how you think it can work better.

I hope to be updating this script either today or this weekend to support some more information like RUNNING PROCESSES and SERVICES and their states. Maybe some other information as well.

Do you have suggestions or want some other information that this script currently does not supply?

Top
#117697 - 2004-04-16 10:45 PM Re: My Computer Info - for Help Desk use PART 3
Trackz Offline
Fresh Scripter

Registered: 2004-03-18
Posts: 37
Loc: Rotterdam, The Netherlands
ok.. that explains a lot..

Some suggestions?
what happens now, is that it only shows applications that have a version number.
When I look at my own network, I see a lot of machines that have software installed, that doesn't contain a version number. Especially the once linked only in the UNINSTALL Paths

I edited the script a little to show some more applications.

Code:


For Each $Key In $App2
$DisplayName = ReadValue($HKLMAppPaths2 + "\" + $Key,'DisplayName')
$DisplayVersion = ReadValue($HKLMAppPaths2 + "\" + $Key,'DisplayVersion')
$Publisher = ReadValue($HKLMAppPaths2 + "\" + $Key,'Publisher')

*<Cut>*




If Len($DisplayName)
If Len($DisplayVersion)

If Len($Publisher)
$SoftInfo = $SoftInfo + Trim($DisplayName) + Chr(42) + Trim($Key) + Chr(42) + Trim($DisplayVersion) + Chr(42) + Trim($Publisher) + @CRLF
Else
$Publisher = "N/A"
$SoftInfo = $SoftInfo + Trim($DisplayName) + Chr(42) + Trim($Key) + Chr(42) + Trim($DisplayVersion) + Chr(42) + $Publisher + @CRLF
EndIf

Else
$DisplayVersion = "N/A"
If Len($Publisher)
$SoftInfo = $SoftInfo + Trim($DisplayName) + Chr(42) + Trim($Key) + Chr(42) + $DisplayVersion + Chr(42) + Trim($Publisher) + @CRLF
Else
$Publisher = "N/A"
$SoftInfo = $SoftInfo + Trim($DisplayName) + Chr(42) + Trim($Key) + Chr(42) + $DisplayVersion + Chr(42) + $Publisher + @CRLF
EndIf
EndIf






Not very nice but it does the trick.
At the lines I now add 'N/A' I want to add publishernames, by checking up on the program name, and changing this to the real value. Something I have to lookup once, and manually add it to the script, for the ones that don't show this Publisher

Like this:
If program=Nero { Publisher = Ahead }
etc.



Some results:

IBM ThinkPad - {B5599ECB-DA72-43EE-8A30-2C80396FF8BB}
AcDSee PowerPack 5 - {5058B085-AA79-41E5-A726-681B4C4B846E}

http://www.dutchhits.com/forumimages/output.bmp
Sorry for the big images.

These keys are returned as InstallPaths. Why are these returned, and would it be possible to gather data for these keys from another location

Most of these records are great to have in my opinion. But this is just a test for me, to see if this could be usefull on our network.

What I do miss, is an option to exclude programs/strings totally from this list.
In my list some programs now show up, and the only way to retrieve info on those, is too look at the compiledate of the program. (ie. modified date).
Version numbers can be equal, even if there are a lot of changes made. something we decided to do in the past, since some programs are changed very often (even more times a week) Although automated, it sometimes fails, and then problems in the program can occur.

That would be usefull for me, since we use a lot of small programs, that change in version weekly/monthly, and we're still not able to have that configured automatically ('failureless') on our networks.
I already have a seperate script that verifies those programs aside, and uninstall/reinstalls the current active version.


Edited by thoek (2004-04-16 10:46 PM)

Top
#117698 - 2004-04-17 01:15 PM Re: My Computer Info - for Help Desk use PART 3
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
Thanks for the feedback thoek

I'll try to implement the PUBLISHER idea this weekend if I get time.

As for the other ideas or issues with versions and exclusions switches I'm sorry, but I wrote this as an general information gathering tool, not as a decision making script.
If you have specific requirements to know when to update a file or group of files I would not use this script, I'd specifically target those files.

p.s. I've updated the script to include PROCESSES, SERVICES, HARD DRIVES, and STARTUP ITEMS.

Remember to clear your cache or at least the MyComputerInfo.zip from your cache before downloading again.

; 001.09 *** 04/17/2004 3:00AM - By NTDOC
; ********** Added support for Hard drives and Startup Items
; 001.08 *** 04/17/2004 2:25AM - By NTDOC
; ********** Added support for listing Services and their states

MyComputerInfo download
http://www.kixhelp.com/Downloads/MyComputerInfo.zip

Top
#117699 - 2004-04-19 01:45 AM Re: My Computer Info - for Help Desk use PART 3
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
Okay Thoek,

I've updated this script again with the code and suggestions you presented for the PUBLISER field and still showing applications even if they don't have a version shown.

I've also added some minor descriptions per request of other users.
  
; 001.10 *** 04/18/2004 4:26PM - By NTDOC
; ********** Modified code to show Application even when version or publisher is blank

Top
#117700 - 2004-04-19 10:31 AM Re: My Computer Info - for Help Desk use PART 3
Trackz Offline
Fresh Scripter

Registered: 2004-03-18
Posts: 37
Loc: Rotterdam, The Netherlands
Thanx. Works fine for me..

Maybe change this section from:

Code:

For Each $Key In $App1
$Path = ReadValue($HKLMAppPaths1 + "\" + $Key,"")
If Len($Path)
If InStr($Path,'%') $Path = ExpandEnvironmentVars($Path) EndIf
If InStr($Path,'"') $Path=Split($Path,'"')[1] EndIf
$Path = IIf(InStr($Key,'WRITE.EXE'),'',$Path)
$Path = IIf(InStr($Key,'winzip.exe'),'',$Path)
If Trim(GetFileVersion($Path,'FileDescription')) <> ""
If Trim(GetFileVersion($Path,'BinFileVersion'))='0.0.0.0'
$FileVer = 'FileVersion'
Else
$FileVer = 'BinFileVersion'
EndIf
$SoftInfo = $SoftInfo + Trim(GetFileVersion($Path,'FileDescription')) + Chr(42)
+ $Path + Chr(42) + Trim(GetFileVersion($Path,$FileVer)) + @CRLF
EndIf
EndIf
Next



to

Code:

For Each $Key In $App1
$Path = ReadValue($HKLMAppPaths1 + "\" + $Key,"")
If Len($Path)
If InStr($Path,'%') $Path = ExpandEnvironmentVars($Path) EndIf
If InStr($Path,'"') $Path=Split($Path,'"')[1] EndIf
$Path = IIf(InStr($Key,'WRITE.EXE'),'',$Path)
$Path = IIf(InStr($Key,'winzip.exe'),'',$Path)
If Trim(GetFileVersion($Path,'FileDescription')) <> ""
If Trim(GetFileVersion($Path,'BinFileVersion'))='0.0.0.0'
$FileVer = 'FileVersion'
Else
$FileVer = 'BinFileVersion'
EndIf

$SoftInfo = $SoftInfo + Trim(GetFileVersion($Path,'FileDescription')) + Chr(42) + $Path + Chr(42) + Trim(GetFileVersion($Path,$FileVer))
+ Chr(42) + Trim(GetFileVersion($Path,'CompanyName')) + @CRLF
EndIf
EndIf
Next



This to retrieve Publisher data for the $HKLMAppPaths1.

Any ideas on the timing of this script?
I mean: what are other users experiences on how long it takes for this script to complete?
It varies a lot on our PCs.
From only 10 seconds, up to 45, or even more on antique machines.

I'm a number freak. Allways want to know how long something runs/executes, and in these cases even create graphical views of it from data daily stored in a db
Maybe this RunningTime() ( http://www.kixtart.org/ubbthreads/showflat.php?Number=81817 ) is an option to include in future version, and show the execution time on top of the results-page.
Easy way to see if there are slower machines on the network, or machines that might need some extra attention


Edited by T_Hoek (2004-04-19 02:40 PM)

Top
#117701 - 2004-04-19 06:09 PM Re: My Computer Info - for Help Desk use PART 3
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
Thanks again T_Hoek for the feedback.

For my own personal preferences I don't think I'll change the code for CompanyName because looking at a couple of computers here none of the entries have that value which would simply create another column that basically had N/A in most if not all of the fields.

As for the timing, it is in there already.
$ScriptRunTime = $StopTime-$StartTime

It is placed lower down in the script. Again this is something of a personal taste. You can easily modify the HTML code to place it on top of your results as the information is already retrieved.



Top
#117702 - 2004-04-19 08:54 PM Re: My Computer Info - for Help Desk use PART 3
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
oops.. Sorry T_Hoek

I actually did implement the CompanyName.

The reason is that it caused an array error issue in the RecordHTMLLogon() UDF.

If part2 has 4 elements then part1 has to have 4 elements as well. I also thought you were looking for a KEY name in the registry, but you're code reads the CompanyName from the actual .EXE if found. DOH! Updated code appears to work correctly now.

Thanks again.

I've updated and posted the updated code to my site.

; 001.11 *** 4/19/2004 11:38AM - By Ron Lewis
; ********** Corrected error introduced with revision 1.10 in GetSoftwareInfo array

Top
#117703 - 2004-04-20 07:56 PM Re: My Computer Info - for Help Desk use PART 3
Trackz Offline
Fresh Scripter

Registered: 2004-03-18
Posts: 37
Loc: Rotterdam, The Netherlands
Sorry, my mistake also.
Forgot to add the corresponding code..
Thanx for adding

Top
#117704 - 2004-04-25 06:32 PM Re: My Computer Info - for Help Desk use PART 3
Trackz Offline
Fresh Scripter

Registered: 2004-03-18
Posts: 37
Loc: Rotterdam, The Netherlands
Another idea for you which I'm trying to work out right now. Again for the software inventory.
I'm adding a timestamp to the registry together with the software-name (HKLM/software/Scriptlogic/LastInventory for example).
At this location I'm adding a line for each package with the corresponding inventory date.
Like: Code:
$swcheck=updateregistry('$HKLMss','$SoftwareName','$TimeNow','REG_SZ')



What I like to see is newly installed software, next to the full list.
Could be newly installed servicepacks, or any other software package.

I'm currently having some problems with comparing the two arrays.
- array with software from your script.
- array with all software added to the registry, after a previous run.
And updating/deleting where possible

I'll try to add some code soon, if I get any further with it.



Top
#117705 - 2004-04-25 10:16 PM Re: My Computer Info - for Help Desk use PART 3
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
LOL - You trying to make your own SMS

Okay sounds good. Just remember there are Registry size limits (not sure how much and where you plan to store all the data is why I bring it up)

Registry Element Size Limits
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/registry_element_size_limits.asp


Top
#117706 - 2004-04-26 09:14 AM Re: My Computer Info - for Help Desk use PART 3
Trackz Offline
Fresh Scripter

Registered: 2004-03-18
Posts: 37
Loc: Rotterdam, The Netherlands
Thanx for pointing that out.
I think it would be sufficient enough to only add a name, and versionnumber to the registry, and verify gathered data with this registry list,
So this wouldn't reach the limits

Top
#117707 - 2004-05-26 03:46 AM Re: My Computer Info - for Help Desk use PART 3
estradac Offline
Fresh Scripter
*

Registered: 2003-09-11
Posts: 18
IS there a way, someone can help me with this Helpdesk Form. I would like to add 3 options on the very top of this page.

First button= Email form to helpdesk
Second button= Print to default printer
Third Option= Add computer name to very Top and IP Address

Also when I change the kix.jpg to anything ..it doesn't appear...

Top
Page 1 of 3 123>


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

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

Generated in 0.088 seconds in which 0.027 seconds were spent on a total of 14 queries. Zlib compression enabled.

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