2017-07-11 3 views
3

Setup Factoryでシリアル番号を1回だけ使用しようとしています。ユーザーあたりのシリアル番号

考え方は次のとおりです。

ユーザーがシリアルを入力すると(シリアルが正しければ)、それは次のページにユーザーを通過するとき、私のインストーラが挿入した後、」..チェックして、次のページに進めていきますそのページには「今すぐインストール」というボタンが必要です

ボタンInstall Nowを押すと、クエリを実行してこのリストから削除してからアプリをインストールします。

質問:シリアルを削除する方法は?

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 
  • あなたはシリアル番号私はこのリストからシリアル番号を削除したい

enter image description here

を生成することができます。ここ

  • シリアルナンバー画面とコードのonNextアクションです:

enter image description here

答えて

2

あなたが出版され、セットアップのプロジェクト設定を編集することはできません。シリアル番号は暗号化され、インストーラに組み込まれ、セットアップにデジタル署名が可能です。実行時にファイルを編集することはできません。

関連する問題