Autor Beitrag
Henry
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 619

WinXP Prof. SP3
D6 Prof.
BeitragVerfasst: Fr 16.01.04 23:37 
Hallo,

habe mal ne Frage zu InnoSetup.
In der Hilfe habe ich entdeckt das es in Innosetup eine Funktion gibt die CheckSerial heist. Kann mir evt. jemand ein Beispiel geben wie man diese Funktion anwenden kann?
In der Hilfe steht,
Zitat:

function CheckSerial(Serial: String): Boolean;
If Setup finds the CheckSerial event function in the Pascal script, a serial number field will automatically appear on the User Info wizard page (which must be enabled using UserInfoPage=yes in your [Setup] section!). Return True to accept the serial number and False to reject it. When using serial numbers, it's important to keep in mind that since no encryption is used and the source code to Inno Setup is freely available, it would not be too difficult for an experienced individual to remove the serial number protection from an installation. Use this only as a convienience to the end user and double check the entered serial number (stored in the {userinfoserial} constant) in your application.

Aber kein Beispiel.
Ich habe es folgendermaßen versucht:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
Begin
If CheckSerial('hallo') then
 Begin
  MSGBOX('Text');
 End;
End.

Wenn ich es so versuche dann bekomme ich die Fehlermeldung:
Unknown identifier 'CheckSerial'

Verwende Version 4.0.11 falls es hilft.

Danke schon einmal für eure Hilfe[/b]

_________________
mfg Henry
patrick
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1481

WIN2k, WIN XP
D6 Personal, D2005 PE
BeitragVerfasst: Sa 17.01.04 12:25 
ein paar zeilen weiter unten wird(wurde) das schonmal durchgekaut:
www.delphi-forum.de/...ght=checkserial+inno

_________________
Patrick
im zweifelsfall immer das richtige tun!!!
Henry Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 619

WinXP Prof. SP3
D6 Prof.
BeitragVerfasst: Sa 17.01.04 19:55 
Hallo,
bevor ich noch jemand verärgere möchte ich nun auch hier die Lösung bereitstellen die ich im DP erhalten habe.
Ich habe halt nur in beiden Foren diese Frage gestellt weil es manchmal vorkommt das in einem Forum schneller eine Antwort kommt als im anderen, ich wollte niemanden ärgern oder umsonst bemühen. Es ist aber auch so das es hätte sein können das (in diesem Fall) hier ein Lösungsvorschlag gekommen wäre der mir noch besser gefallen hätte, oder so.

Hier nun die Lösung die mir scp im DP gegeben hat:
ausblenden Quelltext
1:
2:
3:
4:
5:
function CheckSerial(Serial: String): Boolean; 
begin 
 // MSGBOX('Huhu'); 
  result := (Serial = '1234-5678-90'); 
end;

Die MSGBOX muß aber weggelassen werden da es sonst zu einem Fehler kommt.

Sollte ich das nächstemal wieder in zwei Foren die selbe Frage stellen, dann werde ich Lösungen im jeweils anderen Forum so bald wie möglich bereitstellen.

Ich hoffe niemanden verärgert zu haben :cry:

_________________
mfg Henry
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 17.01.04 21:28 
Henry hat folgendes geschrieben:
Ich hoffe niemanden verärgert zu haben :cry:

Mich nicht. Beim nächsten Mal mach´s einfach so wie ich´s gemacht habe: Wenn du eine für dich akzeptable Lösung in einem anderen Forum bekommen hast, dann setz einen Link auf den Beitrag. Und fertig. :)

Gruß.
Henry Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 619

WinXP Prof. SP3
D6 Prof.
BeitragVerfasst: Sa 17.01.04 22:14 
MathiasSimmack hat folgendes geschrieben:
Mich nicht.

Dann ist ja schon mal gut :D
Werde mal versuchen in Zukunft Links zu setzen oder einfach die Lösung Posten.

_________________
mfg Henry