Licence Tracking/Licence Blocking

abhinav_khanna2008abhinav_khanna2008 Member Posts: 14
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.

Comments

  • sandy_bsilsandy_bsil Member Posts: 40
    Is this Licence Serial No. the License number wat is available in the license.

    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.
    Sandeep B
  • krikikriki Member, Moderator Posts: 9,110
    In the first place : why would you want to do that?

    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.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • sandy_bsilsandy_bsil Member Posts: 40
    Hey better try this..

    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..
    Sandeep B
Sign In or Register to comment.