Platforms to show: All Mac Windows Linux Cross-Platform

Previous items Next items

SystemInformationMBS.isWindows8(orHigher as boolean = false) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Returns true if called on Windows 8.
Example:
msgbox str(SystemInformationMBS.isWindows8)
Notes:
And False on Mac OS X, Linux, Windows 7/Vista/XP/2000/ME/98/95.
If orHigher, than it returns true if OS Version is newer.

Some examples using this method:

SystemInformationMBS.isWindows81(orHigher as boolean = false) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 15.1 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Returns true if called on Windows 8.1
Example:
msgbox str(SystemInformationMBS.isWindows81)
Notes:
And False on Mac OS X, Linux, Windows 7/Vista/XP/2000/ME/98/95/8/10.
If orHigher, than it returns true if OS Version is newer.

Some examples using this method:

SystemInformationMBS.isWindowsVista(orHigher as boolean = false) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 8.4 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Returns true if called on Windows Vista.
Example:
msgbox str(SystemInformationMBS.isWindowsVista)
Notes:
And False on Mac OS X, Linux, Windows 7/XP/2000/ME/98/95.
If orHigher, than it returns true if OS Version is newer.

Some examples using this method:

SystemInformationMBS.isWindowsXP(orHigher as boolean = false) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 8.4 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Returns true if called on Windows XP.
Example:
msgbox str(SystemInformationMBS.isWindowsXP)
Notes:
And False on Mac OS X, Linux, Windows 7/Vista/2000/ME/98/95.
If orHigher, than it returns true if OS Version is newer.

Some examples using this method:

SystemInformationMBS.isYosemite(orHigher as boolean = true) as boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Whether the operation system is Mac OS X 10.10 Yosemite or newer.
Example:
MsgBox str(SystemInformationMBS.isYosemite)
Notes: Returns true on Mac OS X 10.10 or newer.

Some examples using this method:

SystemInformationMBS.LogicalRAM as Double deprecated
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Returns the size of the logical installed memory.
Example:
msgBox format(SystemInformationMBS.LogicalRAM/1024/1024,"0")+" MB of RAM built in."
This item is deprecated and should no longer be used.
Notes:
On Windows the total virtual memory size.
On Linux always 4 GB.

In older plugins this function was named LogicalRAMMBS.
SystemInformationMBS.MACAddress as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Returns the hardware ethernet address of the first ethernet card.
Example:
msgBox SystemInformationMBS.MACAddress
Notes:
It returns a string with 6 bytes.
Works now with MBS Plugin 2.6 for Mac OS Classic, Carbon inside Classic and Mac OS X, but may not work for a Classic application running on Mac OS X. And may fail on some machines if no OpenTransport is running.

On Windows and Mac OS X you can have multiple ethernet cards and you should use a command line tool with the shell class to find what you need.

For example on Windows:

ipconfig /all

or on Mac OS X:

ifconfig -a

You can replace this function with usage of the NetworkInterface class in newer RB versions.

Added Linux support in version 16.4.
SystemInformationMBS.MACAddressString as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Returns the hardware ethernet address of the first ethernet card.
Example:
msgBox SystemInformationMBS.MACAddressString
Notes:
Same as MACAddress, but with different format of output.

You can replace this function with usage of the NetworkInterface class in newer RB versions.

The plugin asks on Mac OS X the IOKit framework for the primary ethernet interface. We are not sure what Apple really defines for being the primary one, so let's test it:

  • Ethernet on and Airport off -> Ethernet MAC Address
  • Ethernet off and Airport on -> Ethernet MAC Address

Added Linux support in version 16.4.

Some examples using this method:

SystemInformationMBS.MacBoardID as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 19.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Queries board-id for Mac.
Example:
MsgBox SystemInformationMBS.MacBoardID
Notes: e.g. "Mac-1234567890123456"
SystemInformationMBS.MacBugFixVersion as Integer
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: The BugFix part of the Mac OS version number.
Example:
MsgBox str(SystemInformationMBS.MacBugFixVersion)
Notes:
The bug fix system version number; in 10.4.17 this would be the decimal value 17.

Intel apps running in Rosetta on Apple M1 will report 10.16 instead of 11.x.

Some examples using this method:

SystemInformationMBS.MacHasHardwareAcceleratedCoreImage as boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 8.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Queries whether hardware accerlation is used for CoreImage.
Example:
if SystemInformationMBS.MacHasHardwareAcceleratedCoreImage then
msgbox "CoreImage should be very fast."
else
msgbox "CoreImage may be slow."
end if
Notes: Queries OpenGL whether programmable fragments are supported.

Some examples using this method:

SystemInformationMBS.MachineID(flags as Integer = 15) as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 10.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Returns a Machine ID for the current computer.
Example:
// this is how we build it.
dim t as string = "MachineID"+SystemInformationMBS.HardDiscSerial+SystemInformationMBS.MacSerialNumber+SystemInformationMBS.MacModel+SystemInformationMBS.CPUBrandString

// you could extend it with SystemInformationMBS.WinProductKey

dim m as string = MD5StringMBS(t)

MsgBox "Machine ID: "+SystemInformationMBS.MachineID+EndOfLine+"My Machine ID: "+m
Notes:
Returns a 32 byte long hex string with a Machine ID.
Example value: "EE537483656B25996B51B7F4C99F9083".

This ID is based on the results of the MacSerialNumber, MacModel, CPUBrandString and HardDiscSerial functions. If all 4 functions have no value, the result is always "A2254DEF74A74608D76D1BA49BD2E82A". Also the result could change in future if we fix a bug in one of the functions so that the result values differ.

It is not based on the MACAddressString function as your MAC Address can change when switching between wired and wireless networks. Also we do not check the PhysicalRAM as RAM is a typical thing which changes over time.

You can store this value in some prerences/license file and later compare it agains the current value to see if the machine may have changed. In that case ask user to revalidate license, for example by asking for the serial number.

It can happen that 2 PCs have the same MachineID, typical two virtual machines. So this ID is not unique. But it is very likely that two different computers produce different MachineIDs.

Added flags parameter in 14.1:
flagHardDiscSerial1Use hard disk serial.
flagMacSerialNumber2Use Mac Serial number (on Mac)
flagMacModel4Use Mac Model (on Mac)
flagCPUBrandString8Use CPU Brand String.
flagWinProductKey16Use Product Key (on Windows only)

The Machine ID may be different if one of the components returns a different result. Result may be different in whether app runs as admin or not on Windows.

In Windows 8.1 it looks like WindowsWMIMBS.InitSecurity(false) must be called at app.open time as Xojo will do some things in background when opening first window which block our queries.
SystemInformationMBS.MacMajorVersion as Integer
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: The major Mac OS version number.
Example:
// show major version number
MsgBox str(SystemInformationMBS.MacMajorVersion)

// and show all three version numbers together:
MsgBox str(SystemInformationMBS.MacMajorVersion)+"."+str(SystemInformationMBS.MacMinorVersion)+"."+str(SystemInformationMBS.MacBugFixVersion)
Notes:
The major system version number; in 10.4.17 this would be the decimal value 10.

On macOS Big Sur, this returns 11 in Apple Silicon application and 10 in Intel application.
On macOS Monterey this returns 12.
If your Intel application is build with older SDK (e.g. Xojo 2019), the result reported version will still be macOS 10.16.

Some examples using this method:

SystemInformationMBS.MacMinorVersion as Integer
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 10.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: The minor Mac OS version number.
Example:
MsgBox str(SystemInformationMBS.MacMinorVersion)
Notes: The minor system version number; in 10.4.17 this would be the decimal value 4.

Some examples using this method:

SystemInformationMBS.MacModel as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 8.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Returns the Mac model string.
Example:
msgbox SystemInformationMBS.MacModel
Notes: for example "<powermac7,3>".

Some examples using this method:

SystemInformationMBS.MacROMBootVersion as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 19.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Returns boot ROM version string.
Example:
MsgBox SystemInformationMBS.MacROMBootVersion
Notes: e.g. "220.270.99.0.0 (iBridge: 16.16.6571.0.0,0)"
SystemInformationMBS.MacSerialNumber as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 8.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Returns the serial number of your local Mac.
Example:
msgbox SystemInformationMBS.MacSerialNumber
Notes:
May return an empty string in case of an error.
(e.g. when being user on Windows or if the Mac does not know its serialnumber)

Some examples using this method:

SystemInformationMBS.MacUUID as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 8.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Returns the unique identifier for the given Mac.
Example:
msgbox SystemInformationMBS.MacUUID
Notes: Returns "" on any error.

Some examples using this method:

SystemInformationMBS.MacVRAMSize as Int64
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 8.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Function: Queries the size of the main video graphics memory size.
Example:
msgbox format(SystemInformationMBS.MacVRAMSize,"0")+" Bytes VRAM."
Notes:
Walks over the list of displays, asks on each display for its VRAM size and returns the first value found.

For some reason this seems not to return more than 256 MB of memory.

Some examples using this method:

SystemInformationMBS.OSName as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Returns a string to display which OS Version you have.
Example:
msgBox SystemInformationMBS.OSName
' may show: Mac OS X
Notes:
Return values possible:
Windows NT
Windows 2000
Windows XP
Windows Vista
Mac OS
Mac OS X
Linux

and a few other Windows versions like 6.2 alias 8.

In older plugins this function was named OSNameMBS.

Some examples using this method:

SystemInformationMBS.OSVersionString as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Returns a string to display which OS Version you have.
Example:
msgBox SystemInformationMBS.OSVersionString
' may show: Mac OS X 10.1.2
Notes:
GetOSVersionStr returns the version string of the OS.
Some Possible values:
"System 7.5.3",
"MacOS 8",
"MacOS 9.1",
"MacOS X 10.4.1",
"Windows NT 3.5",
"Windows 2000 (Service Pack 3)".

In older plugins this function was named OSVersionStrMBS.

On macOS Big Sur, this returns 11.x in Apple Silicon application and 10.6 in Intel application.
On macOS Monterey this returns 12.x.
If your Intel application is build with older SDK (e.g. Xojo 2019), the result reported version will still be macOS 10.16.

Some examples using this method:

SystemInformationMBS.PhysicalRAM as Double
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Returns the size of the physical installed memory.
Example:
msgBox format(SystemInformationMBS.PhysicalRAM/1024/1024,"0")+" MB of RAM built in."
Notes:
On old Windows versions some hundred KBs less for DOS.

Result changed from integer to double in plugin version 3.4 to return correct results on 2 GB RAM. In v5.2 changed to return correct values on Macs with more than 4 GB of RAM.

On Windows the total physical memory size.

In older plugins this function was named PhysicalRAMMBS.

Some examples using this method:

SystemInformationMBS.ProcessorCount(Mode as Integer = 0) as Integer
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Returns the number of processors on the target system.
Example:
MsgBox _
str(SystemInformationMBS.ProcessorCount(SystemInformationMBS.kProcessorCountDefault ))+" default" + EndOfLine + _
str(SystemInformationMBS.ProcessorCount(SystemInformationMBS.kProcessorCountLogical ))+" logical" + EndOfLine + _
str(SystemInformationMBS.ProcessorCount(SystemInformationMBS.kProcessorCountPhysical))+" physical"
Notes:
With plugin version 18.0, we added mode parameter. Pass 2 for physical CPU (kProcessorCountPhysical) and 1 for logical CPU count (kProcessorCountLogical) on Mac/Win.

On Windows or Mac OS the number of cores.
On Linux the number of configured CPUs.

Returns 1 on any error.
SystemInformationMBS.ShortUsername as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Returns the short name of the current user.
Example:
msgbox "Welcome "+SystemInformationMBS.ShortUsername+"!"
Notes:
On Linux and Mac OS X the short user name.

On all other cases the same as UserName function.
SystemInformationMBS.SystemFont as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Returns the name of the used system font.
Example:
msgbox "You are using the system font "+SystemInformationMBS.SystemFont+"."
Notes:
On Windows the system function returns "System" for our tests. Please tell us if this function is not working for you correct on Windows.

On Linux something like "Sans 10" is returned.

In older plugins this function was named SystemFontMBS.
SystemInformationMBS.Username as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Returns the name of the current user.
Example:
msgbox "Welcome "+SystemInformationMBS.Username+"!"
Notes:
Code for Multiple User on Mac OS 9 is build in, but I can't test it.

This is tried on Mac OS:
1. Mac OS X Username function.
2. AppleEvent to FileSharing.
3. Mulitple User Username (Mac OS 9)
4. System username from system resource.

In older plugins this function was named UserNameMBS.
SystemInformationMBS.WinBuildNumber as Integer
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 10.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Function: The build number of the operating system.
Example:
MsgBox str(SystemInformationMBS.WinBuildNumber)
Notes: For example returns 2600 on Windows XP Build 2600.

Some examples using this method:

SystemInformationMBS.WinCSDVersion as string
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 10.3 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Function: A string, such as "Service Pack 3", that indicates the latest Service Pack installed on the system.
Example:
MsgBox SystemInformationMBS.WinCSDVersion
Notes:
Shows here "Service Pack 3" on a Windows XP installation.
If no Service Pack has been installed, the string is empty.
SystemInformationMBS.WindowsAero as boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 10.1 ❌ No ✅ Yes ❌ No ❌ No All
Function: Whether Windows is using the Aero Interface?
Example:
msgbox str(SystemInformationMBS.WindowsAero)
Notes: True if aero is used. False if the status is unknown (e.g. on Windows XP) or Aero is not used.
SystemInformationMBS.WindowsNativeMachine as Integer
Type Topic Plugin Version macOS Windows Linux iOS Targets
method System MBS Util Plugin 22.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Queries the native machine type.
Notes: This may return ARM64 on a Windows with ARM CPU.

Previous items Next items

The items on this page are in the following plugins: MBS Util Plugin.

Feedback: Report problem or ask question.

The biggest plugin in space...


Start Chat