Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    Run OS command, License Sys

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 323 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 15/10/2011 at 23:55, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   10.5 
      Platform:   Windows  ;   
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hi

      Is it possible to run Operating System Command and get the result using coffee?

      If not, how can i handle releasing demo plugin and key to full version?

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 16/10/2011 at 03:25, xxxxxxxx wrote:

        This would be very unsafe.
        Someone would just need to replace the executable with one that does always end with the result needed for activation.

        The best way to protect COFFEE Plugins IMHO is to use an algorithm that is unknown to others which determines if a License Key fits to a specific Cinema 4D Key.
        See this example:

        createLicense() {  
          var c4dLicense  = SysGetUserInfo(0);  
              c4dLicense  = evaluate(strmid(ser,6,5));  
                
          var licenses    = new (array, 3);  
              licenses[0] = int(Modulo(ser*(pow(ser/1242,3)),979975));  
              licenses[1] = int(Modulo(ser*(pow(ser/8951,3)),457382));  
          // ...  
          return licenses;  
        }
        

        Which might evaluate to a serial like this: 8616 - 121 - 8913

        Use this function to create the license, and also to check it.

        var userL       = getLicenseEnteredByUser();  
        var correctL    = createLicense();  
        var i           = 0;  
        for(i = 0; i < sizeof(licenses);  i++) {  
          if (userL[0] != correctL) {  
              // license is wrong !  
          }  
        }
        

        Cheers,
        Niklas

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 19/10/2011 at 00:56, xxxxxxxx wrote:

          Its Smart, Thanks

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 23/10/2011 at 04:50, xxxxxxxx wrote:

            Using COFFEE I can execute program or open file, if success return true.

            Is there a way to execute a program and pass command parameter and get the output result?

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 24/10/2011 at 05:24, xxxxxxxx wrote:

              Originally posted by xxxxxxxx

              Is there a way to execute a program and pass command parameter and get the output result?

              Unfortunatly not.

              cheers,
              Matthias

              1 Reply Last reply Reply Quote 0
              • First post
                Last post