#1
|
|||
|
|||
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 'ValidateSerialNumber@files:ISID.dll stdcall'; function GetMACAddress(output: AnsiString): Boolean; external 'GetMACAddress@files: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; |
Sponsored Links |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
altef_4's installer | altef_4 | Conversion Tutorials | 244 | 24-05-2024 23:20 |
INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup | REV0 | Conversion Tutorials | 129 | 21-05-2021 06:51 |
INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup | REV0 | Conversion Tutorials | 51 | 26-03-2015 07:57 |
I Am Alive Installer (Inno setup) | NamelessOne | PC Games - CD/DVD Conversions | 48 | 25-11-2013 06:35 |