« Lotusphre 2012 - The end of an era? | Main| IBM Lotus Traveler on BlackBerry Playbook »

@GetMachineInfo: New macro for probing user's workstation

Category
Bookmark : del.icio.us  Technorati  Digg This  Add To Furl  Add To YahooMyWeb  Add To Reddit  Add To NewsVine 

I came across a new @Function that I was always always hoping to see added to Lotus Notes one day. @GetMachineInfo has been been introduced in 8.5.3 and can be very useful to both administrators and developers.

Administrators can use it with policies to distinguish between different workstations that any given user is running Notes on. As per IBM's Technote 1501673, "in prior versions of the Notes Client, and policy control, an administrator could target an individual, but not a specific machine configuration for that individual. For certain settings and customers, this made the enforcement of specific settings problematic, either because a user had multiple machines, or because the configurations and usage were not easily partitioned. "

Developers can use it in applications that need to be aware of the user's environment, or applications that collect information about user's workstations (eg. corporate computer inventory) to extract info ranging from specs on hardware (memory, disk space, whether it's a laptop or desktop) to data on Notes client itself (Standard vs. Basic, Multi-user vs. Single User install, does it have Designer or Admin clients installed). Some of this was possible before but you had to use different @Functions (or LotusScript methods/properties) for different things often in combination with queries to Windows Registry and VMIService objects and a lot more code. Now, most of it can be accomplished with just one simple @Function that is platform independent (yes, it works on a Macintosh as well as it does on a Windows PC).

Don't look for any information on it in your Domino Designer 8.5.3 help file, because you will not find anything useful. For some reason, help file that shipped with 8.5.3 was not updated to include any info on this. Refer to IBM's Technote 1501673 for detailed description.

I'm just a bit disappointed that this new formula does not include any keywords for finding out machine's operating system version, and processor info. In my code, I'm currently doing it by querying Windows Registry and VMIService objects, but obviously this works only on Windows based machines. I need to do the same on Macintosh..., does anybody know how to accomplish this with Lotus Script on a Mac?

Syntax for @GetMachineInfo:

@GetMachineInfo( [Keyword]; "Needed for some Keywords string" )

Keywords:

IsLaptop boolean return True if machine is a laptop, otherwise false
IsDesktop boolean return True if machine is NOT a laptop, otherwise false

Example:
info := @GetMachineInfo([IsLaptop]) ;
msg := @If( info ; "This machine is a laptop" ; "This machine is a desktop" ) ;
@Prompt([Ok] ; "" ; msg )

A picture named M2


MachineName string return Name of the machine
boolean return True if MachineName string after keyword matches this machine's MachineName, otherwise false

Example:
info := "Machine name is " + @GetMachineInfo([MachineName]) ;
@Prompt([Ok] ; "" ; info )

A picture named M3

Memory number return Total amount of memory (RAM)

Example:
info := "Total RAM installed " + @Text(@GetMachineInfo([Memory])) + " MB" ;
@Prompt([Ok] ; "" ; info )

A picture named M4

DiskSpace number return Amount of free disk space
Note: With this keyword, you can add a second parameter for the drive to scan for free space. If this parameter is not passed to the function, free space for the first (logical) drive - for example, drive C on Windows system - is displayed.

Example:
info := "Drive M free space is " + @Text(@GetMachineInfo([DiskSpace];"M:")) + " KB" ;
@Prompt([Ok] ; "" ; info )

A picture named M5


IP string/list return String representation of the IP address(es) in the form XXX.XXX.XXX.XXX , otherwise "" (null string) if not available
boolean return True if pattern IP string after keyword matches this machine's IP address, otherwise false

Example:
info := @GetMachineInfo([IP]) ;
@Prompt([Ok] ; "" ; info )

A picture named M6

MAC string/list return String representation of the MAC address(es) in the form XX:XX:XX:XX:XX:XX , otherwise "" (null string) if not available
boolean return True if MAC string after keyword matches this machine's MAC address, otherwise false

Example:
info := @GetMachineInfo([MAC]) ;
@Prompt([Ok] ; "" ; info )

A picture named M7

IsSingleLogOn boolean return True if machine has Notes client installed with "single sign on", otherwise false

IsMultiUser boolean return True if machine has Notes client installed as Multi-User, otherwise false

HasDesigner boolean return True if machine has Designer client installed, otherwise false

HasAdmin boolean return True if machine has Admin client installed, otherwise false

IsStandard boolean return True if machine is running Standard Notes client, otherwise false

EnvVariable string return Requires string of the variable name in Notes.ini to read, and returns the value of that ini variable or "" (null string) if not found

SysEnvVariable string return Requires string of the variable name in system environment to read, and returns the value of that variable or "" (null string) if not
found

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)

RSS FEEDS

Browse By Day

Me

bodek@uwindsor.ca
519-253-3000 x2801

BodekSept2006Small.jpg

Powered By

Domino BlogSphere
Version 3.0.1 Beta 6