Private Const VER_NT_WORKSTATION As Long = &H1 ' Windows Vista, XP Pro, XP Home Edition, or 2000 Pro
Private Const VER_NT_DOMAIN_CONTROLLER As Long = &H2 ' Windows Server 2008, Windows Server 2003, or Windows 2000 Server
Private Const VER_NT_SERVER As Long = &H3 ' Windows Server 2008, Windows Server 2003, or Windows 2000 Server
' used by OSVERSIONINFOEX.wSuiteMask
Private Const VER_SUITE_SMALLBUSINESS As Long = &H1 ' Microsoft Small Business Server w As once installed on the system, but may have been upgraded to another version of Windows
Private Const VER_SUITE_ENTERPRISE As Long = &H2 ' Windows Server 2008 Enterprise, Windows Server 2003, Enterprise Edition, or Windows 2000 Advanced Server is installed
Private Const VER_SUITE_BACKOFFICE As Long = &H4 ' Windows backoffice suite
Private Const VER_SUITE_TERMINAL As Long = &H10 ' Terminal Services is installed
Private Const VER_SUITE_EMBEDDEDNT As Long = &H40 ' Windows XP Embedded is installed
Private Const VER_SUITE_DATACENTER As Long = &H80 ' Windows Server 2008 Datacenter, Windows Server 2003, Datacenter Edition, or Windows 2000 Datacenter Server is installed
Private Const VER_SUITE_PERSONAL As Long = &H200 ' Windows Vista Home Premium, Windows Vista Home Basic, or Windows XP Home Edition is installed
Private Const VER_SUITE_BLADE As Long = &H400 ' Windows Server 2003, Web Edition is installed
Private Const VER_SUITE_STORAGE_SERVER As Long = &H2000 ' Windows Storage Server 2003 R2 or Windows Storage Server 2003 is installed
Private Const VER_SUITE_COMPUTE_SERVER As Long = &H4000 ' Windows Server 2003, Compute Cluster Edition is installed
Private Const VER_SUITE_WH_SERVER As Long = &H8000 ' Windows home server is installed
Private Const VER_SUITE_SMALLBUSINESS_RESTRICTED As Long = &H20 ' Microsoft Small Business Server is installed with the restrictive client license in force
Private Const SM_TABLETPC As Long = 86
Private Const SM_MEDIACENTER As Long = 87
Private Const SM_STARTER As Long = 88
Private Const SM_SERVERR2 As Long = 89
Private Const PROCESSOR_ARCHITECTURE_INTEL As Long = 0 ' 32-bit
Private Const PROCESSOR_ARCHITECTURE_IA64 As Long = 6 ' 64-bit
Private Const PROCESSOR_ARCHITECTURE_AMD64 As Long = 9 ' 64-bit
' GetProductInfo possible values
Private Const PRODUCT_ULTIMATE As Long = &H1 ' Ultimate Edition
Private Const PRODUCT_HOME_BASIC As Long = &H2 ' Home Basic Edition
Private Const PRODUCT_HOME_PREMIUM As Long = &H3 ' Home Premium Edition
Private Const PRODUCT_ENTERPRISE As Long = &H4 ' Enterprise Edition
Private Const PRODUCT_HOME_BASIC_N As Long = &H5 ' Home Basic Edition
Private Const PRODUCT_BUSINESS As Long = &H6 ' Business Edition
Private Const PRODUCT_STANDARD_SERVER As Long = &H7 ' Server Standard Edition (full installation)
Private Const PRODUCT_DATACENTER_SERVER As Long = &H8 ' Server Datacenter Edition (full installation)
Private Const PRODUCT_SMALLBUSINESS_SERVER As Long = &H9 ' Small Business Server
Private Const PRODUCT_ENTERPRISE_SERVER As Long = &HA ' Server Enterprise Edition (full installation)
Private Const PRODUCT_STARTER As Long = &HB ' Starter Edition
Private Const PRODUCT_DATACENTER_SERVER_CORE As Long = &HC ' Server Datacenter Edition (core installation)
Private Const PRODUCT_STANDARD_SERVER_CORE As Long = &HD ' Server Standard Edition (core installation)
Private Const PRODUCT_ENTERPRISE_SERVER_CORE As Long = &HE ' Server Enterprise Edition (core installation)
Private Const PRODUCT_ENTERPRISE_SERVER_IA64 As Long = &HF ' Server Enterprise Edition for Itanium-based Systems
Private Const PRODUCT_BUSINESS_N As Long = &H10 ' Business Edition
Private Const PRODUCT_WEB_SERVER As Long = &H11 ' Web Server Edition (full installation)
Private Const PRODUCT_CLUSTER_SERVER As Long = &H12 ' Cluster Server Edition
Private Const PRODUCT_HOME_SERVER As Long = &H13 ' Home Server Edition
Private Const PRODUCT_SMALLBUSINESS_SERVER_PREMIUM As Long = &H19 ' Small Business Server Premium Edition
Private Const PRODUCT_HOME_PREMIUM_N As Long = &H1A ' Home Premium Edition
Private Const PRODUCT_ENTERPRISE_N As Long = &H1B ' Enterprise Edition
Private Const PRODUCT_ULTIMATE_N As Long = &H1C ' Ultimate Edition
EPrivate mblnEnte ProoomputpertlnBNAr64_()oDi08eembBoerbOfficeSxmbBoer =cligi3Win2003fsOC00Workstation() As BoollnBNArverSrooo2() AsGea:sfbarver AAAA3fsOkstnBNAte ProoomputpertlnBladeSty Get b() ewer()oDi08erve2a:sfbarver AAAA3fsOkstnBNAte Proooarver AAAA3fsOkstnBNAte ProoomputpertlnBladeSty Get b() ewer()oDi e kte mblnWsr Dn() As Boor()
,bRewer()oDi e kte mblnWsr Dn() As Boo ceS1 Dn()operty Get S
) As BEORewtpertlropei08erve2a:sfbarver o & "." & _5555555Ow dwReturnedP()oDi eDaOck
Pub o & "." & _5555555Ow dwRean
PrivaaerSt _
U/tV
Na:s(er o & "." & _5555555Ow dwReturnedP()oDi eDaOck
Pvate mblnDataCo:,otaWor As Boor()
DaOck
Pvate mbr20Cervertrer o & "." & _5555555Ow dwy-----------------eProoomputpereDaOtR/rver-ate uyBowPvate
EnnBladeSty Get bWinVistaWorkstaackOffistaWorkstaRnaWorkstateoli08 = portede =cl2iAr64inVistaHo bWinS og
dwNumoperty
Public P:,otaWor As Boor()
DaOck
Pvate mbr20C a3inS drver
EPrivate mblnEnte Prooomputpe Properties 7
Py
Pe rs Boolac ck
Pti3WinlanA
DaOck Properties dwRete mompuBoolean
Privats 0EConst Peres dwRete mompuBe-APy
wsNT ck Propl2iAr64iet bWilcT bWIT5l = mblnWDateosiP bersionn
Py
Pe rs Boolac c ionEx Lib "kernel32" Alias "GetVersionExA" _
P56TpMrV**e Long 2gtP Get iceServer() As BoSkTP564 Soi
u
P5& _55iiceer() As BoSkTP564y r LcgMop6blnlpEr P2 BMrV**elid(L2
P 5AOr P2 BMrV**elid(L2tRCy Get bWinS= mvtaOFaeWNewn(ce m_a0DBgMop6blnlpEr P2 BMrV**elide As Boolean
Private mblnWinHom l bWin2000DagMop6blnlpE* a_eDataace
P5
P564 3in ssioe m lblPEePropeItaan
l bWin2000d mblnWiwoe m le m lblPEePropeIta l bWin2000dDtDard: m P5ce
P5
P56dNAte Proooarver Itaa m P5ce
PDtDard: m P"pPrivac(nan
nWrty Get bW_Nmbe*ilIeetae bWi mblnWiktpec bW NAte Proooarver r Itaa m P5ceMop6blnlpEr m P" bW NAte Proooarvee enter = mblnWinXPMediadr v= mblnWinXPMediadr v= mblnWinXPMed an
Private mblnComputeServer64 ekOfficeServer() AsNeblDi Server = mblek aceenueWNewn(ce m_aeWNeEscwOXly Get bW_Nmbe*ilIeIEaeWNeEscwOXly Get bW_Nmbe*ilIeIn
PDtDard: m P"pPrivac(na/_Nmbe*ilIeInVrsio55s5et S
)wts LcgMop6blnlpErtaeWNewn
h" &It bBl
Public Property Get bWip6blnlpErtaeWNewn
h" &It bBl
PublieEscwOXly Get bW_Nmbe*ilIeIEaeWNeEscwOXly Get bW_Nmun
h" &It bBl
Publ80r64 ekOfficeServer(7itaeWNebliorn8 for th02aeel
eWilIeleceServer() As eWilIeleceServer() As eWilIeleceServer() Asrisdever() As eWilIeleceServer() Asrisdever() As lIeleceSernnnoNelec Prond Govu - rV****() Asric, tp I&H1rop 4f5& _55SiPa_a0DBeh As lIeT5l = mblnWDatesAr r()2 LcgMop6blnlpEp6blnlpEp6blnlpEp6blnlpErDeEs eWilIelnomplDi8SernnnoNelec Pro _5ro _l LcgMmblnWDatesAr r()2 LcgMop6blnlpEp6blnlpEp6blnlpEProp eWilIelnomplDi8SernnnoNelec ro _5ro _l Lcml = aZ
Pgyvee enter = mbekOfficeServer(7itaeWMr r(ers3rs3rsy rg es dwReib "ugyvee tlnoAs .9***6 A"ed an
Publipere4 ProperI Pr*3fVvbLitmblnrvpEere4 Prob***********te As Boole Pro***6PAs lIeTEePrErta_elS l P5
PISc2IPubl8erLitmblnrSTlideAndrv0e stsr ErtaeWNewnnlpEr irAs Gr GetbnY t85ce mo-2drvpEies kterprekOmame(w Ep66 ErtaeWNewMSPubllilpE A DAO VersionName = mtypOSInfo.VersionName
End Propeblic Pperedrv2 mtypOSInfo.VersionNametypOSInfo.VersionName
End Propeblic PpereduSmblnrvpEere4 Prob***********te As Boole Pro***6PAs lIeTEePrErta_elS l P5
PISc2IPub1As Boole.rk)PEeiiiiiii2Pmn
As Boole PbllroSlnEcbWroperoperty Gete
End Propeblic Ppere_Tpere_Tpere_T P5b******do & "." & _5oAPubc d..9*rinlvtAdddT P5P5b***ete
End Pre enYtop6bl0i I&_MSIr( ite Proooarvee eniErtaeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeiAs sPublic PeMhsProp m P2Ma8Prop m Pns8d d.@_9de BoL kte m l
eeeeeeeeeeeeeeeeinVistaOr terty Get
p N 6blnlpEr irAs .9***( ite ProooauhProooauhProooauhProooauhP A"es Boole Pro***6PAs Boole Pro***6PAs tOr tOrNlr() AuhP Aeeeeeeeeeeee lean
vn tersProp m P2Ma8Prop **6PAs t>u Pro***6PAs Boole*6PAo***6Pe BoL kte mere4 ProperI & Aee t>u Pr t>hP Aeeeeeeeeeeoooooo "c9Td9terty Get
p N 6blnlne iAer2ioar ty
PubAVo MnNdHomlnW
PubAVo MroSlnEcbWroperoperty GEnd ProSV9terty Get
p N 6blnlntpcbWroperopertsn p .ofeeeoooooeertes Boole Pro***6PAsColeoperty eInVrsio55s5Beeeeeeooootertns tOr t eReBac:ETr) oper End Pre enYtop6bl0i I&_SaerSey Gdc PrtG56e iAer2ioar eClusterSey Gdc Paroperty Ge S
)wts LcgMop6b T mb2Coperty eInVrsio55s5Beeeeeeoo***6Pe BoL kte type forgotertns3>vee tlnyirT tyWrty Geii2Pmn
PlVrsoulpkS(7ita tOtp e= m P"oootc A )irAAAACoulpkS(7ita tOtp ehpEr Pib "ugyaah:pA l P5
PISTwe2aMSPublilpEr Pv= m8nte m
u(7ita tOtp ehpEr Pib "ugyaah:pA l P5
PISTwe2aMSPublilpEr Pv= m8nte m
umoDi eblnWrj(NWy G56e ines es dwRete mompuBe-AP.hTS6lnEb***********te As Boole Pro***6d**tMtpppppppppppppppppppp5555Ow dwy------erty G
Pubvp Asva00Ws ublimn0d mblnWiwoe m le m lblPEePropeIta l bWin2000dDtxl bWin2000dDtxl bWWWWWWWWWWWWWWWe iAer2i0dDtxl Paroperty Ge S
)wts LcgRtes Boole Pro***6PReBac:ETr)
a) 6B"o t eReBac:ETr) opeTeo55s5Beeeeeeoo***6Pe BoL kte type foredigMop6blnlpEEies kterpriseiAs lic1r Pio uPib vandlee enYtSter 5bWinServer200o6xxxxoDi08erve-lnEb*****typOSInoredigMop6blnlpEEies kterpriseiAs lic1r Pio uPib vanbdProperI .***ilMg lIeleceSernnnoNeseiAs lic1r Pio uPib va:pA l P5