• 【海洋女神原创】一个简单的带序列号输入的安装包


    首先建立一个Installscript Project

    在Installation Designer中,找到Behavior and Logic -> Install Script, 在Setup.rul中找到Before Move Data -> OnFirstUIBefore,找到Dlg_SdRegisterUser标签中

    一:

    用 nResult = SdCustomerInformationEx(szTitle,szName,szCompany,svSerial,bvAllUser);

    这行去代替nResult = SdRegisterUser( szTitle, szMsg, szName, szCompany );

    (用到的新变量请自行定义, STRING svSerial; BOOL bvAllUser;)

    二:

     if(svSerial='1234123412341234')    then  goto Dlg_SetupType2;
         else
           if(nResult = BACK) then goto Dlg_SdLicense2;
           else     
           MessageBox("Wrong Serial Number!", SEVERE);
            goto Dlg_SdRegisterUser;
           endif;
          endif;
        

    这段去代替if(nResult = BACK) then goto Dlg_SdLicense2;

    编译之,一个简单的带序列号输入的安装包就做好了。这里序列号验证简单处理为'1234123412341234',实际应用中,可以使用更复杂的算法,可以直接将算法写在IS函数里,也可以用C++或C#编译成DLL来进行密码验证。

    IS调用DLL可以参阅http://hi.baidu.com/javalang/blog/item/84ebbbde7f51a05dcdbf1adf.html

  • 相关阅读:
    升级centos6.5系统的gcc为4.8.5的简易步骤
    赛车比赛(洛谷U4566)
    月考(cogs 1176)
    xth的旅行(codevs 1450)
    魔法禁书目录2:回家(codevs 3024)
    交换
    牛的旅行(洛谷 1522)
    长途旅行
    序列问题
    正确答案
  • 原文地址:https://www.cnblogs.com/Cindy_weiwei/p/2115416.html
Copyright © 2020-2023  润新知