|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Chapters
Services
Feature Zones
|
IntroductionAidaNet is an XPath script that displays XML information generated by the freeware tool Aida32. AIDA32 is a professional system information, diagnostics and benchmarking program running on Win32 platforms. It extracts details of all components of the PC. It can display information on the screen, print it, or save it to file in various formats like HTML, CSV or XML. For corporate users, AIDA32 offers command-line switches, network audit and audit statistics, remote system information and network management. Ensure you have at least version 3.83. Download Aida here. BackgroundThe good news is that you don't have to run Aida on each computer to make the inventory. How to create XML files? (The demo is provided with only a few XML files). Just add this line in the user logon script: shell "cmd /c \\Myserver\aida\aida32 /R \\Myserver\aida\Reports\$hostname
/XML /AUDIT /SILENT"
Then just wait a few days, ensuring that everyone login on the network and you can know what programs are installed on your company, who has the bigger RAM, what is the most used 'default printer' and so on. Using the codeAidaNet doesn't have any knowledge of Aida XML structure. The program uses a script to display information. For each useful information you want to display, add an <Config>
<FolderPath>..\\..\\sample</FolderPath>
<Alias Path="/Report">
<Alias Path="Page[Title='Summary']">
<Alias Path="Group[Title='Computer']">
<Alias Name="OS_NAME" Title="Name"
Path="Item[Title='Operating System']/Value" />
<Alias Name="OS_SP" Title="Service Pack"
Path="Item[Title='OS Service Pack']/Value" />
<Alias Name="PC_NAME" Title="PC Name"
Path="Item[Title='Computer Name']/Value" />
<Alias Name="USER_NAME" Title="User name"
Path="Item[Title='User Name']/Value" />
</Alias>
<Alias Path="Group[Title='Motherboard']">
<Alias Name="CPU_FULL" Title="CPU Name"
Path="Item[Title='CPU Type']/Value" />
<Alias Name="RAM" Title="RAM"
Path="Item[Title='System Memory']/Value" />
</Alias>
</Alias>
</Alias>
<Group Name="OS" Title="Operating Systems">
<Alias Name="OS_NAME"/>
<Alias Name="OS_LANG"/>
<Alias Name="OS_SP"/>
</Group>
</Config>
The Since version 1.5, Starting demoThe first thing to do is to modify aidaNet.xml file. The Using the demoThe "filter selection" grid (on top) displays all Aliases and Groups names. The "corresponding files" grid (on bottom) columns grids and the "detail" grid (on right) are defined in the same XML script file ( Exporting resultsYou can export data in the 3 grids to a text file. Tabulation is used to separate fields on the same line. The export saves only what is visible on the grids, because saving all PC information where 'Internet Explorer " is installed can produce many pages of report. Points of InterestAidaNet can be used for other kind of XML files, like XML book files. It's a nice example of XPath use. It's a FLWOR statement (FOR-LET-WHERE-ORDER-RETURN) like program (still not available). This program uses 2 ways to read XML files:
ImprovementsNext version will provide an XPath editor. ListView bonusThe project comes with a using ListViewHelper
...
public ListViewSorter MySorter ;
...
// Create the Sorter
MySorter = new ListViewSorter (MyListView) ;
// automatic user sort on header click
MyListView.ListViewItemSorter = MySorter ;
// You must specify the array containing the 2 sort pictures.
MyListView.TableArrows = imageList1 ;
...
// Sort by code. First arg is the column used to sort the list
MySorter.SortBy (MyColumnHeader , SortOrder.Ascending)
The same class allows to resize all columns. Microsoft provides const for optimizing column width based on the header OR items, but not both. Sample use: MySorter.ResizeColumns() ;
History
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||