|
正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!
您需要 登录 才可以下载或查看,没有账号?立即注册
x
首先建立一个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来进行密码验证。 |
|