home *** CD-ROM | disk | FTP | other *** search
- Program RkpBrand;
-
- {
- This is a sample program using rkPlus. It is a sample of a software
- branding program that would be used by the user to enter their name
- and registration key and create a key file. This sample will create
- a key file for the RkpDemo program, using a registration key which
- would be generated by the programmer using the RkpGKey program.
- }
-
-
- Uses
- Crt, Dos, RkPlus;
-
-
- Const
- RkpBrandVer = '2.3';
- MonthNames : Array[1..12] of String[3]
- = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
-
-
- Var
- kc : Char;
-
-
- Begin
- OwnerCode := 'ArgleBarbWotsLeeb';
- ProgramCode := 'RkpDemo Three';
- KeyFile := 'RKPDEMO';
- WriteLn('RkpBrand ' + RkpBrandVer);
- WriteLn('Software Branding Program for RkpDemo 3.x');
- WriteLn('(c) 1991 TrendSoft, Inc.');
- WriteLn;
- Write('Enter name of person to register : ');
- ReadLn(Reg.Name1);
- WriteLn;
- WriteLn('[D] Demo key');
- WriteLn('[R] Registration key');
- WriteLn;
- Write('Type? ');
- kc := UpCase(ReadKey);
- WriteLn(kc);
- If (kc in ['D','d']) then
- Reg.Level := 0
- Else
- Reg.Level := 1;
- WriteLn;
- Write('Enter the registration key : ');
- ReadLn(Reg.Key);
- Reg.ID := 'RkpDemo';
- Reg.Message := '(c) 1991 TrendSoft, Inc.';
- Reg.Name2 := '';
- Reg.Name3 := '';
- VerifyKey;
- If (Reg.Status <> Registered) then
- WriteLn('Invalid key!')
- Else Begin
- SaveRegInfo;
- If (Reg.Status = Registered) then
- WriteLn(Reg.KeyPath + ' created.')
- Else
- WriteLn('Error creating file.');
- End;
- End.