Topics Topics Help/Instructions Help Edit Profile Profile Member List Register  
Search Last 1 | 3 | 7 Days Search Search Tree View Tree View  
Randem Systems Support Board * Installers * Inno key generator - HDD serial number - where error < Previous Next >

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

randem
Moderator
Username: randem

Post Number: 1192
Registered: 04-2004

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, March 18, 2009 - 03:35 am:   Edit Post Delete Post View Post/Check IP    Move Post (Moderator/Admin Only)

Unless you give more information it is impossible for me to help. I have never seen the Inno Setup Key Generator used in this fashion but that does not mean it will not work. The concept of the Inno Key Generator is to install on your development machine to generate keys for you application to give to the customer. Your application calls the Inno Setup Key Generator using the key information to verify the key given.

Please explain what you are attempting to accomplish here.
Top of pagePrevious messageNext messageBottom of page Link to this message

cisak
New member
Username: cisak

Post Number: 2
Registered: 03-2009

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, March 18, 2009 - 12:39 am:   Edit Post Delete Post View Post/Check IP    Move Post (Moderator/Admin Only)

sample:

[_ISTool]
EnableISX=true
Use7zip=false

[Files]
Source: C:\inno setup 5.2.3\ikg\ikg\sample2.iky; DestDir: {tmp}; Flags: ignoreversion
Source: C:\inno setup 5.2.3\ikg\ISID\ISID.dll; DestDir: {sys}\ISID; Flags: ignoreversion
Source: C:\inno setup 5.2.3\ikg\ISID\ISID.dll; DestDir: {app}\ISID; Flags: ignoreversion



[Setup]
AppName=Inno Key Generator
AppVerName=Inno Key Generator 1.0.2.1
DefaultDirName={pf}\MJ Freelancing\IKG
DefaultGroupName=Inno Key Generator
OutputDir=output
AppCopyright=Copyright © Oct 2002 - 2006 MJ Freelancing
OutputBaseFilename=IKGSetup

[Icons]
Name: {group}\Inno Key Generator; Filename: {app}\IKG\IKG.exe; IconFilename: {app}\IKG\IKG.exe; IconIndex: 0
Name: {group}\Uninstall IKG; Filename: {uninstallexe}; IconIndex: 0

Name: {group}\IKG Help; Filename: {app}\IKG\IKGHelp.chm; WorkingDir: {app}\IKG; Comment: IKG Help; Flags: createonlyiffileexists; IconIndex: 0
Name: {group}\IKG Help; Filename: {app}\IKG\IKGHelp.hlp; WorkingDir: {app}\IKG; Comment: IKG Help; Flags: createonlyiffileexists; IconIndex: 0
[Code]
function ValidateSerialNumber(InnoKeyFile, User, Orgn, ProdCode, HDD, MAC, PrivateKey, Serial: String): Boolean;
external 'ValidateSerialNumber@files:ISID.dll stdcall';



var
UserPage: TInputQueryWizardPage;
UserValues: TArrayOfString;

function GetHDDSerial(Drive: Char; HDD : String): Integer;
external 'GetHDDSerial@files:ISID.dll stdcall';



procedure InitializeWizard();
begin

{ create the custom page }
UserPage := CreateInputQueryPage(wpInfoBefore, //wpWelcome,
'Enter Registration Details', 'You need to be a registered user to be able to proceed',
'Enter your registration details exactly (case sensitive), then click Next.');
UserPage.Add('HDD:', False);
UserPage.Add('Unlock Code:', False);
UserPage.Add('Private Key:', False);







{ Try to find the settings that were stored last time (also see below). }
SetArrayLength(UserValues, 3);

end;



end.


procedure RegisterPreviousData(PreviousDataKey: Integer);
begin
{ Store the settings so we can restore them next time }


SetPreviousData(PreviousDataKey, 'HDD', UserPage.Values[1]);
SetPreviousData(PreviousDataKey, 'Unlock', UserPage.Values[2]);
SetPreviousData(PreviousDataKey, 'Private', UserPage.Values[3]);
end;



function ScriptDlgPages(CurPage: Integer; BackClicked: Boolean): Boolean;
var
ExpPath: String;

begin

Result := True;

if (CurPage = UserPage.ID) then
begin
ExtractTemporaryFile('sample2.iky'); { the public key file }

ExpPath := ExpandConstant('{tmp}\sample2.iky');

Result := False;


UserValues[1] := UserPage.Values[1];
UserValues[2] := UserPage.Values[2];
UserValues[3] := UserPage.Values[3];

if (UserValues[1] = '') or (UserValues[2] = '') or (UserValues[3] = '') then
MsgBox('No fields can be blank !', mbError, MB_OK)
else
begin
Result := ValidateSerialNumber( ExpPath,
'','','',
UserValues[1],
'',
UserValues[3],
UserValues[2] );

if (not Result) then
MsgBox('Invalid Entry !', mbError, MB_OK);

end
end

end;



function NextButtonClick(CurPage: Integer): Boolean;
begin
Result := ScriptDlgPages(CurPage, False);
end;


function BackButtonClick(CurPage: Integer): Boolean;
begin
Result := True;//ScriptDlgPages(CurPage, True);
end;


function HasHtmlHelp(): Boolean;
begin
{ HHCTRL.OCX GUID }
Result := RegValueExists(HKCR, 'CLSID{4662DAB0-D393-11D0-9A56-00C04FB68B66}\InprocServer32', '');
end;


function HasNoHtmlHelp(): Boolean;
begin
Result := not HasHtmlHelp;
end;

Add Your Message Here
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image

Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration