Difference between revisions of "Extended host attribute matching"
(→os) |
(→Detailed descriptions) |
||
Line 53: | Line 53: | ||
All attributes are matched using regular expressions. | All attributes are matched using regular expressions. | ||
The collected information is added to the <wpkg/> node of the wpkg.xml file, which allows reporting tools to apply the extended matching too. | The collected information is added to the <wpkg/> node of the wpkg.xml file, which allows reporting tools to apply the extended matching too. | ||
+ | |||
+ | To learn about the regular expression syntax used in WPKG, visit the following website: [http://msdn.microsoft.com/en-us/library/ae5bf541%28vs.71%29.aspx http://msdn.microsoft.com/en-us/library/ae5bf541%28vs.71%29.aspx] | ||
===hostname=== | ===hostname=== |
Revision as of 09:57, 5 August 2011
Contents
[hide]Supported host attributes
!!! This requires WPKG 1.2 or higher !!!
Below find a table of supported host attributes.
Attribute | Description | Example content collected by WPKG |
---|---|---|
hostname | the name of the host | hostname="satellite" |
os | the operating system | os="microsoft windows 7 home premium, , sp1, 6.1.7601" |
architecture | the processor architecture | architecture="x64" |
ipaddresses | all active IP addresses | ipaddresses="10.0.0.2,192.168.56.1" |
domainname | the domain the host belongs to | domainname="wpkg.org" |
groups | all groups the host belongs to | groups="design,office" |
lcid | the language of the operating system | lcid="c07" |
Where to use them
Below find a table of where you can use these attributes.
File | Node | Example |
---|---|---|
hosts.xml | host | <host name="..." proifile-id="..." os="..." ... /> |
variable | <variable name="..." value="..." os="..." ... /> | |
profiles.xml | package | <package package-id="..." os="..." ... /> |
variable | <variable name="..." value="..." os="..." ... /> | |
packages.xml | variable | <variable name="..." value="..." os="..." ... /> |
install | <install cmd="..." os="..." /> | |
upgrade | <upgrade cmd="..." os="..." /> | |
downgrade | <downgrade cmd="..." os="..." /> | |
remove | <remove cmd="..." os="..." /> |
Detailed descriptions
All attributes are matched using regular expressions. The collected information is added to the <wpkg/> node of the wpkg.xml file, which allows reporting tools to apply the extended matching too.
To learn about the regular expression syntax used in WPKG, visit the following website: http://msdn.microsoft.com/en-us/library/ae5bf541%28vs.71%29.aspx
hostname
This contains the name of the system, which is also contained in the Windows environment variable %COMPUTERNAME%.
Example usage:
<host hostname="^VM\-.+$" profile-id="VirtualMachines" />
os
This contains the full description of the operations system, which consists of the following parts:
- OS-caption
- OS-description
- CSD-version (usually the service pack)
- OS-version
Known descriptions:
(Please help to maintain this table)
OS String | Match Pattern |
---|---|
microsoft windows 2000 professional, , sp4, 5.0.2195 | os="professional.+5\.0\.[0-9][0-9][0-9][0-9]" |
microsoft windows 2000 server, , sp4, 5.0.2195 | os="server.+5\.0\.[0-9][0-9][0-9][0-9]" |
microsoft windows xp professional, , sp3, 5.1.2600 | os="professional.+5\.1\.[0-9][0-9][0-9][0-9]" |
microsoft(r) windows(r) xp professional x64 edition, , sp2, 5.2.3790 | os="professional.+5\.2\.[0-9][0-9][0-9][0-9]" architecture="x64" |
microsoft(r) windows(r) server 2003, standard edition, , sp2, 5.2.3790 | os="server.+standard.+5\.2\.[0-9][0-9][0-9][0-9]" |
microsoft(r) windows(r) server 2003 web edition, , sp2, 5.2.3790 | os="server.+web.+5\.2\.[0-9][0-9][0-9][0-9]" |
microsoft(r) windows(r) server 2003 enterprise x64 edition, , sp2, 5.2.3790 | os="server.+enterprise.+5\.2\.[0-9][0-9][0-9][0-9]" architecture="x64" |
microsoft(r) windows(r) server 2003 standard edition, r2, sp2, 5.2.3790 | os="server.+standard.+r2.+5\.2\.[0-9][0-9][0-9][0-9]" |
microsoft(r) windows(r) server 2003 standard x64 edition, r2, sp2, 5.2.3790 | os="server.+standard.+r2.+5\.2\.[0-9][0-9][0-9][0-9]" architecture="x64" |
microsoft® windows vista™ home premium, , sp2, 6.0.6002 | os="premium.+6\.0\.[0-9][0-9][0-9][0-9]" |
microsoft® windows® storage server 2008 standard, , sp2, 6.0.6002 | os="storage.+standard.+6\.0\.[0-9][0-9][0-9][0-9]" |
microsoft windows 7 home premium, , sp1, 6.1.7601 | os="premium.+6\.1\.[0-9][0-9][0-9][0-9]" |
microsoft windows 7 professional, , sp1, 6.1.7601 | os="professional.+6\.1\.[0-9][0-9][0-9][0-9]" |
microsoft windows 7 enterprise, , , 6.1.7600 | os="7 enterprise.+6\.1\.[0-9][0-9][0-9][0-9]" |
microsoft windows 7 ultimate, , , 6.1.7600 | os="ultimate.+6\.1\.[0-9][0-9][0-9][0-9]" |
microsoft windows server 2008 r2 standard, , sp1, 6.1.7601 | os="server.+standard.+6\.1\.[0-9][0-9][0-9][0-9]" |
microsoft windows server 2008 r2 enterprise, , sp1, 6.1.7601 | os="server.+enterprise.+6\.1\.[0-9][0-9][0-9][0-9]" |
Example usage:
<profile id="DesktopPC">
<!-- install Adobe Reader 9 only on Windows 2000 -->
<package package-id="AdobeReader9" os="5\.0\.[0-9][0-9][0-9][0-9]"/>
<!-- install Adobe Reader 10 only on Windows XP and higher -->
<package package-id="AdobeReader10" os="5\.[1-9]\.[0-9][0-9][0-9][0-9]|6\.[0-9]\.[0-9][0-9][0-9][0-9]"/>
</profile>
architecture
This contains the processor architecture of the current operating system.
Below find a table of possible values.
Value | Description |
---|---|
x86 | Intel x86 compatible 32-bit architecture |
x64 | AMD64 compatible 64-bit architecture |
ia64 | Itanium compatible 64-bit architecture |
Notice that a 32-bit Windows version installed on a 64-bit capable CPU is still flagged as 32-bit.
Example usage:
<!-- set destination folder based on architecture -->
<variable name="PKG_DEST" value="%ProgramFiles%\Mozilla Firefox" architecture="x86"/>
<variable name="PKG_DEST" value="%ProgramFiles(x86)%\Mozilla Firefox" architecture="x64"/>
ipaddresses
This contains all currently active IP addresses of the system or an empty string, if no network adapter is currently active.
Example usage:
<host ipaddresses="^10\.0\.0\.[0-9]+$" profile-id="ExternalHosts" />
domainname
This contains the name of the domain the system belongs to or an empty string, if it is not a domain member.
Example usage:
<host domainname="wpkg.org" profile-id="WpkgHosts" />
groups
This contains the names of all groups the system belongs to or an empty string, if it is not a member of any group.
Example usage:
<host groups="office" profile-id="OfficeHosts" />
lcid
This contains the language identifier of the operating system, for a list of possible values visit Locale IDs Assigned by Microsoft.
Example usage:
<!-- default language is English -->
<variable name="PKG_LANGUAGE" value="en-us"/>
<!-- overwrite default language for German systems -->
<variable name="PKG_LANGUAGE" value="de" lcid="407,c07,1407,1007,807"/>