SetupData.IsValidSerialNumber

boolean SetupData.IsValidSerialNumber ( 

string ListName,

string SerialNumber )

Example 1

bValid = SetupData.IsValidSerialNumber("List 1", strSerial);

Checks if a specified serial stored in string "strSerial" is valid in "List 1"

Example 2

-- Get the list names and set serial number to search for
tListNames = SetupData.GetSerialListNames();
sSerialToCheck = "ABCD-1234-DCBA-4321";

-- assume the serial number is not valid
bIsValid = false;

-- Traverse through the name table
for nIndex, sName in pairs(tListNames) do
    -- check if given serial is valid in current list
    bIsValid = SetupData.IsValidSerialNumber(sName, sSerialToCheck)
    if bIsValid then
        -- the serial is valid, break out of the loop
        break;
    end
end


if bIsValid then
    -- The serial number exists in at least one of the lists
    Dialog.Message("", "YAY");
else
    -- The serial number does not exist in any of the lists
    Dialog.Message("", "NAY");
end

Checks if a given serial number is valid in any of the lists in the installer.

See also:  Related Actions