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 Jan 21, 2020 5:47 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: Add items to Statistics?
PostPosted: Wed Oct 13, 2010 4:23 am 
Offline
Contributor

Joined: Thu May 03, 2007 10:38 am
Posts: 116
Location: Midwest
Is is possible to add Office Versions and Service Packs to the Statistics options?


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 13, 2010 10:38 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
Why not... It's a bit messy with the way Microsoft installs the suite with all the individual apps but should be close to usefull.

Create the view in list_viewdef_statistic_office.php
Code:
<?php

$query_array=array("headline"=>__("Statistic for Microsoft Office Versions"),
                   "sql"=>"
                           SELECT
                               DISTINCT software_name, software_version,
                               COUNT( * ) AS count_item,
                               round( 100 / (
                                       SELECT count(software_uuid) FROM software, system
                                       WHERE
                                           software_name LIKE 'Microsoft Office%' AND
                                           software_timestamp=system_timestamp AND
                                           software_uuid=system_uuid
                                       )
                                 * COUNT( * )
                               ,$round_to_decimal_places ) AS percentage
                               FROM
                                   software, system
                               WHERE
                                    software_name LIKE 'Microsoft Office%' AND
                                    software_timestamp=system_timestamp AND
                                    software_uuid=system_uuid
                               GROUP BY software_name
                               ",
                   "sort"=>"software_name",
                   "dir"=>"ASC",
                   "get"=>array("file"=>"list.php",
                                "title"=>__("Systems installed this Version of this Software"),
                                "var"=>array("name"=>"%software_name",
                                             "version"=>"%software_version",
                                             "view"=>"systems_for_software_version",
                                             "headline_addition"=>"%software_name",
                                            ),
                               ),
                   "fields"=>array("10"=>array("name"=>"software_name",
                                               "head"=>__("Name"),
                                               "show"=>"y",
                                               "link"=>"y",
                                               ),
                                   "20"=>array("name"=>"software_version",
                                               "head"=>__("Version"),
                                               "show"=>"y",
                                               "link"=>"y",
                                              ),
                                   "30"=>array("name"=>"count_item",
                                               "head"=>__("Count"),
                                               "show"=>"y",
                                               "link"=>"n",
                                               "search"=>"n",
                                              ),
                                   "40"=>array("name"=>"percentage",
                                               "head"=>__("Percentage"),
                                               "show"=>"y",
                                               "link"=>"n",
                                               "search"=>"n",
                                              ),
                                  ),
                  );
?>


Make the view accessible from the main menu

Code:
Index: include_menu_array.php
===================================================================
--- include_menu_array.php    (revision 1251)
+++ include_menu_array.php    (working copy)
@@ -210,8 +210,9 @@
                                     "22"=>array("name"=>"Thunderbird Versions", "link"=>"./list.php?view=statistic_thunderbird", "image"=>"images/mail_tb.png", "title"=>"Mozilla Thunderbird Versions",),
                                     "23"=>array("name"=>"Adobe Flash Player Versions", "link"=>"./list.php?view=statistic_adobe_flash_player", "image"=>"images/adobe_flash_player.png", "title"=>"Adobe Flash Player Versions",),
                                     "24"=>array("name"=>"Adobe Reader Versions", "link"=>"./list.php?view=statistic_adobe_reader", "image"=>"images/adobe_reader.png", "title"=>"Adobe Reader Versions",),
-                                    "25"=>array("name"=>"OpenOffice.org Versions", "link"=>"./list.php?view=statistic_openoffice.org", "image"=>"images/oo.org.png", "title"=>"OpenOffice.org Versions",),
-                                    "26"=>array("name"=>"Java Versions", "link"=>"./list.php?view=statistic_java", "image"=>"images/java.png", "title"=>"Java Versions",),
+                                    "25"=>array("name"=>"Microsoft Office Versions", "link"=>"./list.php?view=statistic_office", "image"=>"images/x-office-spreadsheet.png", "title"=>"Microsoft Office Versions",),
+                                    "26"=>array("name"=>"OpenOffice.org Versions", "link"=>"./list.php?view=statistic_openoffice.org", "image"=>"images/oo.org.png", "title"=>"OpenOffice.org Versions",),
+                                    "29"=>array("name"=>"Java Versions", "link"=>"./list.php?view=statistic_java", "image"=>"images/java.png", "title"=>"Java Versions",),
                                     "30"=>array("name"=>"Memory Size", "link"=>"./list.php?view=statistic_memory", "image"=>"images/memory.png", "title"=>"Memory Size",),
                                     "40"=>array("name"=>"Processor Types", "link"=>"./list.php?view=statistic_processor", "image"=>"images/processor.png", "title"=>"Processor Types",),
                                     "50"=>array("name"=>"Hard Drive", "link"=>"./list.php?view=statistic_harddrive", "image"=>"images/harddisk.png", "title"=>"Hard Drive",),


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 13, 2010 10:57 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
Maybe something that filters for Office Suite only installs would be better.

list_viewdef_statistic_office.php
Code:
<?php

$query_array=array("headline"=>__("Statistic for Microsoft Office Versions"),
                   "sql"=>"
                           SELECT
                               DISTINCT software_name, software_version,
                               COUNT( * ) AS count_item,
                               round( 100 / (
                                       SELECT count(software_uuid) FROM software, system
                                       WHERE
                                          (software_name LIKE 'Microsoft Office Basic%' OR
                                          software_name LIKE 'Microsoft Office Enterprise%' OR
                                          software_name LIKE 'Microsoft Office Home and Student%' OR
                                          software_name LIKE 'Microsoft Office Personal%' OR
                                          software_name LIKE 'Microsoft Office Professional%' OR
                                          software_name LIKE 'Microsoft Office Small Business Edition%' OR
                                          software_name LIKE 'Microsoft Office Standard%' OR
                                          software_name LIKE 'Microsoft Office Ultimate%' OR
                                          software_name LIKE 'Microsoft Office XP Media%' OR
                                          software_name LIKE 'Microsoft Office XP PIPC%' OR
                                          software_name LIKE 'Microsoft Office XP Professional%' OR
                                          software_name LIKE 'Microsoft Office XP Small Business%' OR
                                          software_name LIKE 'Microsoft Office XP Standard%' OR
                                          software_name LIKE 'Microsoft Office XP Web Server%') AND
                                           software_timestamp=system_timestamp AND
                                           software_uuid=system_uuid
                                       )
                                 * COUNT( * )
                               ,$round_to_decimal_places ) AS percentage
                               FROM
                                   software, system
                               WHERE
                                  (software_name LIKE 'Microsoft Office Basic%' OR
                                  software_name LIKE 'Microsoft Office Enterprise%' OR
                                  software_name LIKE 'Microsoft Office Home and Student%' OR
                                  software_name LIKE 'Microsoft Office Personal%' OR
                                  software_name LIKE 'Microsoft Office Professional%' OR
                                  software_name LIKE 'Microsoft Office Small Business Edition%' OR
                                  software_name LIKE 'Microsoft Office Standard%' OR
                                  software_name LIKE 'Microsoft Office Ultimate%' OR
                                  software_name LIKE 'Microsoft Office XP Media%' OR
                                  software_name LIKE 'Microsoft Office XP PIPC%' OR
                                  software_name LIKE 'Microsoft Office XP Professional%' OR
                                  software_name LIKE 'Microsoft Office XP Small Business%' OR
                                  software_name LIKE 'Microsoft Office XP Standard%' OR
                                  software_name LIKE 'Microsoft Office XP Web Server%') AND
                                    software_timestamp=system_timestamp AND
                                    software_uuid=system_uuid
                               GROUP BY software_name
                               ",
                   "sort"=>"software_name",
                   "dir"=>"ASC",
                   "get"=>array("file"=>"list.php",
                                "title"=>__("Systems installed this Version of this Software"),
                                "var"=>array("name"=>"%software_name",
                                             "version"=>"%software_version",
                                             "view"=>"systems_for_software_version",
                                             "headline_addition"=>"%software_name",
                                            ),
                               ),
                   "fields"=>array("10"=>array("name"=>"software_name",
                                               "head"=>__("Name"),
                                               "show"=>"y",
                                               "link"=>"y",
                                               ),
                                   "20"=>array("name"=>"software_version",
                                               "head"=>__("Version"),
                                               "show"=>"y",
                                               "link"=>"y",
                                              ),
                                   "30"=>array("name"=>"count_item",
                                               "head"=>__("Count"),
                                               "show"=>"y",
                                               "link"=>"n",
                                               "search"=>"n",
                                              ),
                                   "40"=>array("name"=>"percentage",
                                               "head"=>__("Percentage"),
                                               "show"=>"y",
                                               "link"=>"n",
                                               "search"=>"n",
                                              ),
                                  ),
                  );
?>


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 14, 2010 1:12 am 
Offline
Contributor

Joined: Thu May 03, 2007 10:38 am
Posts: 116
Location: Midwest
Alright that worked - I appreciate the help.

Is there a way to add What service pack windows is running as well?


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 14, 2010 2:11 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
Add service pack info to the "OS Type" statistics page or somewhere els?. The info is collected by audit.vbs but not displayed on very many screens. Maybe the only current display area is the "OS Information" report for individual systems. I'm not sure the "OS Type" stats page would be a good place.


Top
 Profile  
Reply with quote  
PostPosted: Sat Oct 16, 2010 3:58 am 
Offline
Contributor

Joined: Thu May 03, 2007 10:38 am
Posts: 116
Location: Midwest
How is the service pack defined?

Take for example
"130"=>array("name"=>"system_build_number", "head"=>__("Build Number"),),

I tried changing this with
"130"=>array("name"=>"system_build_number", "head"=>__("Service Pack"),),

I tried replacing system_build_number with Servicepack and OSSerPack and neither displayed any info.
I was referencing Audit.vbs for the info.


Figured it out by looking at some of the other script stuff - system_service_pack....


Top
 Profile  
Reply with quote  
PostPosted: Sat Oct 16, 2010 4:07 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
I assume you're trying to add the service pack info to the system_viewdef_summary.php file. You can see an example of the service pack in system_viewdef_os.php.

"50"=>array("name"=>"system_service_pack", "head"=>__("Service Pack"),)

The "head" is just the display name text for the value which is determined by "name."


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.  [ 7 posts ] 

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