Go Back   FileForums > Off Topic > Software

Reply
 
Thread Tools Display Modes
  #1  
Old 21-01-2013, 19:47
thilanka thilanka is offline
Registered User
 
Join Date: Oct 2011
Location: CO
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
thilanka is on a distinguished road
Inno Setup Secure Installer

this is my inno setup script (inno setup key generator script)

i want to set to Input Query to mac address and Private key automatically and none editable.

inno setup key generator Download (sample2.iky, ISID.dll)

http://www.mjfreelancing.com/index.p...d=11&Itemid=13

inno setup download

www.jrsoftware.org/isdl.php

picture1

http://i49.tinypic.com/nbodif.jpg

Picture2

http://i49.tinypic.com/22iaub.jpg

Sorry For my English

Pleas help me

thanks

[_ISTool]
EnableISX=true
Use7zip=false

[Files]
Source: sample2.iky; DestDir: {tmp}; Flags: ignoreversion


Source: ISID.dll; DestDir: {sys}\ISID; Flags: ignoreversion




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

[ThirdParty]
CompileLogMethod=append

[Code]


function ValidateSerialNumber(InnoKeyFile, User, Orgn, ProdCode, HDD, MAC, PrivateKey, Serial: AnsiString): Boolean;
external '[email protected]:ISID.dll stdcall';
function GetMACAddress(output: AnsiString): Boolean;
external '[email protected]:ISID.dll stdcall';

var
UserPage: TInputQueryWizardPage;
UserValues: TArrayOfString;


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('MAC Address:', true);
UserPage.Add('Unlock Code:', False);
UserPage.Add('Private Key:', False);


{ Set default values }
SetArrayLength(UserValues, 3);
RegQueryStringValue(HKLM, 'Software\Microsoft\Windows\Hitman', 'Hitman', UserValues[0]);
RegQueryStringValue(HKLM, 'Software\Microsoft\Windows\Hitman', 'Hitman', UserValues[1]);
if (UserValues[0] = '') and (UserValues[1] = '') then begin
RegQueryStringValue(HKCU, 'Software\Microsoft\ND\User2', 'md', UserValues[0]);
RegQueryStringValue(HKCU, 'Software\Microsoft\ND\User2', 'MD2', UserValues[1]);
end;


{ Try to find the settings that were stored last time (also see below). }
UserPage.Values[0] := GetPreviousData('MAC', UserValues[0]);
UserPage.Values[1] := GetPreviousData('Unlock', UserValues[1]);
UserPage.Values[2] := GetPreviousData('Private', UserValues[2]);


end;


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

SetPreviousData(PreviousDataKey, 'MAC', UserPage.Values[0]);
SetPreviousData(PreviousDataKey, 'Unlock', UserPage.Values[1]);
SetPreviousData(PreviousDataKey, 'Private', UserPage.Values[2]);

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[0] := UserPage.Values[0];
UserValues[1] := UserPage.Values[1];
UserValues[2] := UserPage.Values[2];



if (UserValues[0] = '') or (UserValues[1] = '') or (UserValues[2] = '') then
MsgBox('No fields can be blank !', mbError, MB_OK)
else
begin

//UserPage.Values[0] := GetPreviousData('MAC', UserValues[0]);
//UserPage.Values[1] := GetPreviousData('Unlock', UserValues[1]);
//UserPage.Values[2] := GetPreviousData('Private', UserValues[2]);

//function ValidateSerialNumber(InnoKeyFile, User, Orgn, PCe,HDD,MAC,PrivateKey, Serial: AnsiString): Boolean;
Result := ValidateSerialNumber( ExpPath,'','','','',UserValues[0],UserValues[2],UserValues[1] );




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;
Reply With Quote
Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
altef_4's installer altef_4 Conversion Tutorials 243 12-11-2018 15:02
INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup REV0 Conversion Tutorials 125 13-03-2016 18:39
INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup REV0 Conversion Tutorials 51 26-03-2015 06:57
I Am Alive Installer (Inno setup) NamelessOne PC Games - CD/DVD Conversions 48 25-11-2013 05:35



All times are GMT -7. The time now is 06:18.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 2000-2018, FileForums @ https://fileforums.com