Is there any option to block a licence file to be used except the one specified??
i.e.
I have 2 licence files Suppose
Licence Serial No. 1000
Licence Serial No. 2000
I want that only sessions from the Licence 2000 remain active or are authenticated on the login else any other connection should be terminated.
Any one having an idea about this please Explain.
Regards.
0
Comments
Then wat you can do is to run a report in OnRun() of the Company-Initialize codeunit to test the license number.
This report will have the DataItem 2000000040 and write a code in
License Information - OnAfterGetRecord()
IF "License Information"."Line No." <> 4 THEN
CurrReport.SKIP;
LicenseNo := COPYSTR("License Information".Text,27,100);
if LicenseNo <> 'XXX' then
error('Sorry wrong license');
//LicenseNo Text variable of length 30.
I think this would help you.
In stead of running a report to test it, you can let the function itself test it. But I am not sure it will work correctly. Or better : it is better to create so much error messages that the session becomes unusable without the correct license.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Put this code in CodeUnit 1 OnRun()
TestLic := SERIALNUMBER;
IF TestLic <> 'xxx' THEN BEGIN
IF ISCLEAR(WinScript) THEN
CREATE(WinScript);
WinScript.SendKeys('%f');
WinScript.SendKeys('b');
WinScript.SendKeys('c');
WinScript.SendKeys('{DOWN}');
WinScript.SendKeys('{ENTER}');
CLEAR(WinScript);
END;
where..
TestLic Text 30
WinScript Automation 'Windows Script Host Object Model'.WshShell
Hope this helps u..