I'm trying to make a serial number used only one time in Setup Factory.
The idea is the following:
When the user enters the serial, my installer will check and move forward to next page (if serial is correct) .. when it passes the user to next page 'after inserting the serial number' then that page must have a button called 'install now'
When pressing the button Install Now , it will execute a query, method to delete it from this list first then install the app.
The question is : How to delete the serial?
The code in OnNext action:
-- These actions are performed when the Next button is clicked.
-- get the serial number that the user entered
local strSerial = SessionVar.Expand("%SerialNumber%");
-- Trim leading and trailing spaces from the serial number.
strSerial = String.TrimLeft(strSerial);
strSerial = String.TrimRight(strSerial);
SessionVar.Set("%SerialNumber%", strSerial);
-- the name of the serial number list you want to use, e.g. "Serial List 1"
-- (use nil to search through all of the serial number lists)
local strListName = nil;
-- from _SUF70_Global_Functions.lua:
-- search through the specified serial number list for a match
local bSerialIsValid = g_IsSerialNumberInList(strSerial, strListName);
-- if the user entered a valid serial number, proceed to the next screen,
-- otherwise display an error message and check whether they have any retries left
if(bSerialIsValid) then
-- advance to the next screen
Screen.Next();
else
-- user entered an invalid serial number
SerialNumberScreen.AttemptCount = SerialNumberScreen.AttemptCount + 1;
-- display an 'Invalid serial number' message
Dialog.Message(SetupData.GetLocalizedString("MSG_ERROR"), SetupData.GetLocalizedString("ERR_INVALID_SERIAL"));
-- if the user is out of retries, exit the application
if(SerialNumberScreen.AttemptCount >= SerialNumberScreen.MaxAttempts) then
Application.Exit(0);
end
end
- Here where you can generate serial numbers
I want to delete the serial number from this list.
- here is the onNext action for the serial number screen and the code:

