每个用户的序列号

Serial number per user

我正在尝试使序列号在 Setup Factory 中仅使用一次。

思路如下:

当用户输入序列号时,我的安装程序将检查并前进到下一页(如果序列号正确).. 当它将用户传递到下一页时 'after inserting the serial number' 那么该页面必须有一个按钮叫做 'install now'

当按下按钮 Install Now 时,它会执行一个查询,方法是先从列表中删除它,然后再安装应用程序。

The question is : How to delete the serial?

OnNext动作中的代码:

-- 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

我想从此列表中删除序列号。

您不能编辑已发布设置的项目设置。序列号被加密并嵌入到安装程序中,然后可以对安装程序进行数字签名。无法在运行时编辑文件。