zoukankan      html  css  js  c++  java
  • 【海洋女神原创】一个简单的带序列号输入的安装包

    首先建立一个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

  • 相关阅读:
    Ubuntu下录音机程序的使用
    Bash中的数学计算
    Bash中的数学扩展
    Bash的命令替换
    top的用法
    VirtualBox的快照功能
    格式化输出和printf命令
    read命令读取用户输入
    Bash的作业控制
    Codeforces Round #455 (Div. 2)
  • 原文地址:https://www.cnblogs.com/Cindy_weiwei/p/2115416.html
Copyright © 2011-2022 走看看