Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Tue Apr 16, 2024 11:44 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 38 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
PostPosted: Mon Jan 05, 2009 6:43 pm 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
[quote="sgovind"]Hull or any1 can tell me which line is responsible to reading the product number in the audit.vbs so i can get some1 to look in to modifying to fit my need (mostly all HP hardware Users)

pls i badly in need manage to get almost all hp laptop to work fine .... now only desktops


The BIOS info. is read in the section

'''''''''''''''''''''''''''
' Bios Information '
'''''''''''''''''''''''''''
(strangely enough :twisted: )

Not sure if this includes your product info but I presume so.

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
PostPosted: Tue Apr 14, 2009 11:27 am 
Offline
Newbie

Joined: Fri Apr 03, 2009 2:37 pm
Posts: 13
The HP warranty info link doesnt work for the newer desktops we've got here. :( It does provide links for some of the older devices though. O-A reports the device as such:
Model #: HP Compaq dc7700 Small Form Factor
Serial #: AUD99999X9
Manufacturer: Hewlett-Packard

Hopefully someone can help us out here. 8)


Top
 Profile  
Reply with quote  
PostPosted: Tue Apr 14, 2009 5:50 pm 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
Presumably the HP warranty link is expecting different information for the new machines, and/or the OA website doesn't know how to look up warranty for the manufacturer.

What does the warranty link look like for a machine, if you look it up manually?

What does the warranty link look like for a machine that does work from OA?


Does OA show a link for the new machines, or does it say "Links to Manufacturer: ? No Links configured for this Manufacturer"

I have a fairly old machine acting as a remote print server and OA says the following.

[color=#0000BF]Chassis Type: Mini Tower
Model #: HP PC
Serial #: NL23716XXX
Manufacturer: Hewlett-Packard
Operating System: 2000 Pro
Build Number: 2195
UUID: 00:04:23:17:F0:A9
OS Installed Date: 2002-09-30
IP: 192.168.045.025
Subnet: 255.255.255.0
DHCP: No
Date First Audited: 2007-02-06 08:21
Date Last Audited: 2007-02-06
Memory: 253 MB
Links to Manufacturer: ? No Links configured for this Manufacturer
What does it look like: Show me some pictures of the HP PC
[/color]

The code we need to modify will be in system.php round about here....

[code]

...

//Links to Manufacturer
if(isset($myrow["system_vendor"]) AND $myrow["system_vendor"]!="" AND ($viewname=="summary" OR $viewname=="chassis")){
$bgcolor = change_row_color($bgcolor,$bg1,$bg2);
echo "<tr style=\"background-color:" . $bgcolor . ";\" >\n";
echo "<td>\n";
echo __("Links to Manufacturer");
echo ": &nbsp;";
echo "<a href=\"#\" onclick=\"alert('".__("Regarding to Modell # and Serial #")."');\">?</a>";
echo "</td>\n";
echo "<td>\n";

if ($myrow["system_vendor"] == "Dell Inc." || $myrow["system_vendor"] == "Dell Computer Corporation" || $myrow["system_vendor"] == "Dell Inc") {
if(isset($myrow["system_id_number"]) AND $myrow["system_id_number"]!=""){
echo " <a href='http://support.dell.com/support/topics/global.aspx/support/my_systems_info/en/details?c=us&amp;cs=usbsdt1&amp;servicetag=" . $myrow["system_id_number"] . "' onclick=\"this.target='_blank';\">".__("Warranty Information")."</a>";
echo " / ";
echo " <a href='http://support.dell.com/support/downloads/index.aspx?c=us&amp;l=en&amp;s=gen&amp;servicetag=" . $myrow["system_id_number"] . "' onclick=\"this.target='_blank';\">".__("Drivers &amp; Software")."</a>";
$links_to_manu=1;
}
} elseif ($myrow["system_vendor"] == "Compaq" || $myrow["system_vendor"] == "HP"){
if(isset($myrow["system_id_number"]) AND $myrow["system_id_number"]!=""){
echo " <a href='http://www4.itrc.hp.com/service/ewarranty/warrantyResults.do?BODServiceID=NA&amp;RegisteredPurchaseDate=&amp;country=GB&amp;productNumber=&amp;serialNumber1=" . $myrow["system_id_number"] . "' onclick=\"this.target='_blank';\">".__("Warranty Information")."</a>";
echo " / ";
echo " <a href='http://h20180.www2.hp.com/apps/Lookup?h_lang=en&amp;h_cc=uk&amp;cc=uk&amp;h_page=hpcom&amp;lang=en&amp;h_client=S-A-R135-1&amp;h_pagetype=s-002&amp;h_query=" . $myrow["system_model"] . "' onclick=\"this.target='_blank';\">".__("Drivers &amp; Software")."</a>";
$links_to_manu=1;
}
} elseif ($myrow["system_vendor"] == "IBM" || $myrow["system_vendor"] == "LENOVO") {
if(isset($myrow["system_id_number"]) AND $myrow["system_id_number"]!=""){
echo " <a href='http://www-307.ibm.com/pc/support/site.wss/quickPath.do?quickPathEntry=" . $myrow["system_model"] . "' onclick=\"this.target='_blank';\">".__("Product Page")."</a>";
echo " / ";
$links_to_manu=1;
}
if(isset($myrow["system_model"]) AND $myrow["system_model"]!= "" AND isset($myrow["system_id_number"]) AND $myrow["system_id_number"]!=""){
echo " <a href='http://www-307.ibm.com/pc/support/site.wss/warrantyLookup.do?type=".substr($myrow["system_model"],0,4)."&amp;serial=".$myrow["system_id_number"]."&amp;country=897&amp;iws=off&amp;sitestyle=lenovo' onclick=\"this.target='_blank';\">".__("Warranty Information 1")."</a>";
echo " / ";
echo " <a href='http://www-307.ibm.com/pc/support/site.wss/warrantyLookup.do?type=".substr($myrow["system_model"],-9,-5)."&amp;serial=".$myrow["system_id_number"]."&amp;country=897&amp;iws=off&amp;sitestyle=lenovo' onclick=\"this.target='_blank';\">".__("Warranty Information 2")."</a>";
$links_to_manu=1;
} } elseif ($myrow["system_vendor"] == "Gateway") {
if(isset($myrow["system_id_number"]) AND $myrow["system_id_number"]!=""){
echo " <a href='http://support.gateway.com/support/allsysteminfo.asp?sn=" . $myrow["system_id_number"] . "' onclick=\"this.target='_blank';\">".__("Support Page")."</a>";
$links_to_manu=1;
}
}
if(!isset($links_to_manu)){
echo __("No Links configured for this Manufacturer");
}

echo "</td>\n";

...
[/code]

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
PostPosted: Tue Apr 14, 2009 6:13 pm 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
Try modifying about line 360 to read

[code]
// Added Hewlett-Packard (AJH 14th April 2009)
} elseif ($myrow["system_vendor"] == "Compaq" || $myrow["system_vendor"] == "HP" || $myrow["system_vendor"] == "Hewlett-Packard"){
[/code]

.. or upgrade to SVN 1150

This seems to fix the link for me.

One final point, Mr Gates' wonderful operating system :evil: , and WMI in particular, seem incapable of passing the Product Number back to the auditing PC, so you may need to input this manually.

Alternatively, we may be able to use this... http://forum.sysinternals.com/forum_posts.asp?TID=10856

Let me know if you need to do anything further with this.

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 15, 2009 9:57 am 
Offline
Newbie

Joined: Fri Apr 03, 2009 2:37 pm
Posts: 13
Good job mate! Looks like its linking through now. As you say Product Number looks as though it needs manual input at this stage. I also changed country code to Au. I wouldn't want to potentially be mistaken for someone who's going to lose the ashes! :P


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 23, 2009 8:55 pm 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
... ashes, what are those? I'm in Scotland mate... need to explain... :twisted:

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 24, 2009 1:24 pm 
Offline
Newbie

Joined: Fri Apr 03, 2009 2:37 pm
Posts: 13
Well the Aussies winning the rugby is a given ;)

Is there any chance we're going to get support for the HP product code being directly linked through?


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 24, 2009 10:16 pm 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
All we need is the product code!

AFAIK the product code is not picked up by the audit, but since I have no HP machines, I am at a loss to try to fix this, does anybody else have any ideas?

... Surely its the New Zelanders that win the rugby.. :twisted:

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 27, 2009 2:57 pm 
Offline
Newbie

Joined: Fri Apr 03, 2009 2:37 pm
Posts: 13
I cant find it in the WMI on my HP desktop :(
[code]wmic:root\cli>path win32_computersystem_OEMstringarraylabel get /all
ERROR:
Code = 0x80041002
Description = Not found[/code]


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 29, 2009 11:13 am 
Offline
Helper

Joined: Fri Jun 06, 2008 3:02 pm
Posts: 79
Location: Singapore
digging up the grave post.

some where it says by this wmi call i can get the product number how to use it

[code] Win32_ComputerSystem_OEMStringArrayLabel[/code]

_________________
**---((( [color=#FF0000]SGR[/color] )))---****
Server Info:
OS : CentoS 5
Auditing: 1143 machines
LDAP: Active Directory
Support Open-Audit : [url]http://www.open-audit.org/phpBB3/viewtopic.php?f=5&t=2990#p13523[/url]


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 21, 2009 8:40 am 
Offline
Newbie

Joined: Thu Aug 20, 2009 11:42 pm
Posts: 12
Location: NY USA
This exat question has haunted me for life with HP. Being an HP certified tech getting the product number from a client is sometimes impossible, and Inventoring a server room, and a few hundred workstations is a nightmare without allways getting this info automaticly. With that being said I was playing around a bit today and came of with something that work some of the time. The correct WMI is Win32_ComputerSystem.OEMStringArray. So with a few Modifacations to a few files you can "AudIT" and get the producd ID and check warranty. This is not perfect and I just found Open-AudIT 2 days ago so it sill needs some work and thought.

This is what I did.


In Audit.VBS around line 978 under
[code]
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)
For Each objItem in colItems
system_model = clean(objItem.Model)[/code]
ADD
[code]
system_pn= Join(objItem.OEMStringArray, ",")
system_pn= Replace(system_pn,"Product ID:"," ")
[/code]

Then around line 1032 change [code]
form_input = "system02^^^" & trim(system_model) & "^^^" & system_name _
& "^^^" & system_num_processors & "^^^" & system_part_of_domain _
& "^^^" & system_primary_owner_name & "^^^" & system_system_type _
& "^^^" & mem_size & "^^^" & system_id_number _
& "^^^" & trim(system_vendor) & "^^^" & domain_role_text _
& "^^^" & tm_zone & "^^^" & tm_daylight & "^^^"
entry form_input,comment,objTextFile,oAdd,oComment
form_input = ""[/code]

TO
[code]
form_input = "system02^^^" & trim(system_model) & "^^^" & system_name _
& "^^^" & system_num_processors & "^^^" & system_part_of_domain _
& "^^^" & system_primary_owner_name & "^^^" & system_system_type _
& "^^^" & mem_size & "^^^" & system_id_number _
& "^^^" & trim(system_vendor) & "^^^" & domain_role_text _
& "^^^" & tm_zone & "^^^" & tm_daylight & "^^^" & system_pn & "^^^"
entry form_input,comment,objTextFile,oAdd,oComment
form_input = ""[/code]

admin_pc_add_2.php line 475 add

[code]
$system_pn = trim($extended[13]);
[/code]

then change line 480
[code]
$sql .= "net_domain_role = '$net_domain_role', time_caption = '$time_caption', time_daylight = '$time_daylight'";
[/code]
to
[code]
$sql .= "net_domain_role = '$net_domain_role', time_caption = '$time_caption', time_daylight = '$time_daylight' , system_pn = '$system_pn'";
[/code]

Now you have to add a colum to the database, the system table called "system_pn" I used varchar 150

Now that the data is in the database we need to show it

in system_viewdef_summary.php

add
[code]
"101"=>array("name"=>"system_pn", "head"=>__("System Part #"),),
[/code]
right after "100"

Now if we edit our hp warrenty info link and add this we can get right to the warranty info

in system.php line 362 add ". $myrow["system_pn"] ." after productNumber= so it looks like this. don't forget the quotes

[code]
echo " <a href='http://www4.itrc.hp.com/service/ewarranty/warrantyResults.do?BODServiceID=NA&amp;RegisteredPurchaseDate=&amp;country=GB&amp;productNumber=". $myrow["system_pn"] ."&amp;serialNumber1=" . $myrow["system_id_number"] . "' onclick=\"this.target='_blank';\">".__("Warranty Information")."</a>";
[/code]

Now when you audit a pc that has this set it works well. I have some servers that do and some that do not. I also have some workstations that give me:
ABS 70/71 60 61 62 63

I am not sure what that means but I will continue to work at it. Let me know what you think.


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 21, 2009 11:02 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1964
Location: Brisbane, Australia
Some nice work there Keith.
Keep going - and welcome aboard !!!

_________________
Support and Development hours available from [url=https://opmantek.com]Opmantek[/url].
Please consider a purchase to help make Open-AudIT better for everyone.


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 25, 2009 1:35 am 
Offline
Newbie

Joined: Thu Aug 20, 2009 11:42 pm
Posts: 12
Location: NY USA
Well after a lot of playing around and talking with HP there is no consistant way of Polling for the P/N. HP own SIM and other Managment Apps can not 100% get the information. It is only relibly stored in the BIOS and HP's BIOS can not be read remotly for that information(even though you can remote setup the bios.) Their solutions was when you purchase the units you can get a list of Serial Numbers and Part Numbers. They werer not much help. I also could not find out how the information gets into WMI in the first place.

I am going to edit my script to only insert if the Value of OEMStringArray starts with Product Id: Then I will make the field editable so I can manualy put it there.

If you want me to post my changes let me know.


By the way Great piece of software. Let me know if I can help with any programing or testing.

Thanks


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 25, 2009 2:09 am 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
Anything you would like commited to the SVN version, let us know... BTW the problem is compunded by the fact that HP computers are two separate sets of species, former HP lines and former Compaq lines, each of which does things differently.

BTW dont know if this is of any use... you probably already tried it...

http://www.microsoft.com/downloads/deta ... laylang=en


or try this snippet... (Change the line that says <<<<<<<<< CHANGE THIS !!!!! )

[code]
On Error Resume Next

Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20

arrComputers = Array("yourcomputername") <<<<<<<< CHANGE THIS !!!!!!
For Each strComputer In arrComputers
WScript.Echo
WScript.Echo "=========================================="
WScript.Echo "Computer: " & strComputer
WScript.Echo "=========================================="

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_BIOS", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)

For Each objItem In colItems
strBiosCharacteristics = Join(objItem.BiosCharacteristics, ",")
WScript.Echo "BiosCharacteristics: " & strBiosCharacteristics
strBIOSVersion = Join(objItem.BIOSVersion, ",")
WScript.Echo "BIOSVersion: " & strBIOSVersion
WScript.Echo "BuildNumber: " & objItem.BuildNumber
WScript.Echo "Caption: " & objItem.Caption
WScript.Echo "CodeSet: " & objItem.CodeSet
WScript.Echo "CurrentLanguage: " & objItem.CurrentLanguage
WScript.Echo "Description: " & objItem.Description
WScript.Echo "IdentificationCode: " & objItem.IdentificationCode
WScript.Echo "InstallableLanguages: " & objItem.InstallableLanguages
WScript.Echo "InstallDate: " & WMIDateStringToDate(objItem.InstallDate)
WScript.Echo "LanguageEdition: " & objItem.LanguageEdition
strListOfLanguages = Join(objItem.ListOfLanguages, ",")
WScript.Echo "ListOfLanguages: " & strListOfLanguages
WScript.Echo "Manufacturer: " & objItem.Manufacturer
WScript.Echo "Name: " & objItem.Name
WScript.Echo "OtherTargetOS: " & objItem.OtherTargetOS
WScript.Echo "PrimaryBIOS: " & objItem.PrimaryBIOS
WScript.Echo "ReleaseDate: " & WMIDateStringToDate(objItem.ReleaseDate)
WScript.Echo "SerialNumber: " & objItem.SerialNumber
WScript.Echo "SMBIOSBIOSVersion: " & objItem.SMBIOSBIOSVersion
WScript.Echo "SMBIOSMajorVersion: " & objItem.SMBIOSMajorVersion
WScript.Echo "SMBIOSMinorVersion: " & objItem.SMBIOSMinorVersion
WScript.Echo "SMBIOSPresent: " & objItem.SMBIOSPresent
WScript.Echo "SoftwareElementID: " & objItem.SoftwareElementID
WScript.Echo "SoftwareElementState: " & objItem.SoftwareElementState
WScript.Echo "Status: " & objItem.Status
WScript.Echo "TargetOperatingSystem: " & objItem.TargetOperatingSystem
WScript.Echo "Version: " & objItem.Version
WScript.Echo
Next
Next


Function WMIDateStringToDate(dtmDate)
WScript.Echo dtm:
WMIDateStringToDate = CDate(Mid(dtmDate, 5, 2) & "/" & _
Mid(dtmDate, 7, 2) & "/" & Left(dtmDate, 4) _
& " " & Mid (dtmDate, 9, 2) & ":" & Mid(dtmDate, 11, 2) & ":" & Mid(dtmDate,13, 2))
End Function
[/code]

_________________
Andrew

[size=85]OA Server: Windows XP/ XAMPP, Mandriva/Apache, Ubuntu
Auditing: 300+ Wstns, 20+ Srvrs, Thin clients, Linux boxes, Routers, etc
OS's: Windows XP , W2K Srvr, W2K3 Srvr, W2K8, Vista, Windows 7, Linuxes (and a Mac at home)
LDAP: Active Directory[/size]


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 25, 2009 3:19 am 
Offline
Newbie

Joined: Thu Aug 20, 2009 11:42 pm
Posts: 12
Location: NY USA
[quote="A_Hull"]
BTW dont know if this is of any use... you probably already tried it...

http://www.microsoft.com/downloads/deta ... laylang=en


I use to use that, but I find this much better

[url=http://thepowershellguy.com/blogs/posh/archive/2007/03/22/powershell-wmi-explorer-part-1.aspx]Power Shell WMI Explorer[/url]

HP Drives me nuts and they allways have.

Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 38 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group