杉宫竹苑工作室

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 2286|回复: 0

一个简单的带序列号输入的安装包

[复制链接]
发表于 2017-3-1 15:08:59 | 显示全部楼层 |阅读模式

正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!

您需要 登录 才可以下载或查看,没有账号?立即注册

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


二:用
  1. if(svSerial='1234123412341234')    then  goto Dlg_SetupType2;
  2.      else
  3.        if(nResult = BACK) then goto Dlg_SdLicense2;
  4.        else      
  5.        MessageBox("Wrong Serial Number!", SEVERE);
  6.         goto Dlg_SdRegisterUser;
  7.        endif;
  8.       endif;
复制代码

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

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

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|SgzyStudio

GMT+8, 2024-5-14 10:56 , Processed in 0.112153 second(s), 22 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表