Serial number for each user

I am trying to make a serial number used only once per Setup Factory

.

The idea is this:

When the user enters the serial number, my installer will check and go to the next page (if the serial code is correct) .. when it passes the user to the next page "after inserting the serial number" then this page should have a button called 'install now'

When the button is clicked, Install Now

it will first execute the request, the method to remove it from this list, then install the app.

The question arises: how to remove the serial number?

OnNext

Action code :

-- 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 you can generate serial numbers

enter image description here

I want to remove the serial number from this list.

  • here is the onNext action for the serial number and code screen:

enter image description here

+3


source to share


1 answer


You cannot edit the project settings of the published customization. Serial numbers are encrypted and embedded in the installation program, after which the installation can be digitally signed. The file cannot be edited at runtime.



+2


source







All Articles