1.0

Table Of Contents
www.vmware.com
252
VMware ACE Administrator’s Manual
counter++;
}
/* No match found */
fprintf(stderr, "User (%s) not found in list\n", username);
exit:
return result;
}
Sample Renewal Script
The following sample script is written in VB Script. It is installed by VMware ACE
Manager as expire_on_fridays.vbs.
'
' VMware Sample Script
'
' This is a sample expiration/renewal script for VMware ACE
'
' This script returns a UTC time (number of seconds since
' 1/1/1970) for use in determining product expiration. If
' the time returned is less than the current time, the
' product has expired, otherwise it has not. This script
' always marks the product as expired on Fridays, just
' because. Otherwise, it expires on Jan 1, 2010.
'
' This script must be run as follows:
' cscript -nologo expire_on_fridays.vbs
Dim StdOut
Dim StdErr
Set StdOut = WScript.StdOut
Set StdErr = WScript.StdErr
' Output to stderr is sent to the VMware log file. It
' does not, in itself, constitute an error in the script.
StdErr.WriteLine "Running expire_on_fridays.vbs"
If (DatePart("w", Now) = 6) Then
' It's a Friday. Game over.
StdOut.Write DateDiff("s", "1/1/1970", Now) - 100
Else