(defun keygen-cadpower-22 (
      / CADPowerPath CADPowerVersion CADPowerLanguage LicenseMethod 
        OperatingPlatform SerialNumber ApplicationKey UserName CompanyName 
        Address1 Address2 Address3 City State Country ZIPCode Telephone Fax 
        Email LicenseType NumberOfUsers OrderNumber OrderDate ExpireAfter
        StartDate ExpiryDate DelayTime HowSold AppKeyType SteelWorksLicense
        SerialNumber ApplicationKey OperatingPlatform2 LicFileName
        GUIDCheck FloatingLicenseDialog FloatingLicensePath LicenseFor 
        ACCM_Comments CLIENT_Comments Geological_License
        #CADPOWERKEYLST12 #CADPOWERKEYLST12_DE #CADPOWERKEYLST12_ES 
        #CADPOWERKEYLST12_RU #CADPOWERKEYLST13 #CADPOWERKEYLST13_DE 
        #CADPOWERKEYLST13_ES #CADPOWERKEYLST14 #CADPOWERKEYLST14_DE
        #CADPOWERKEYLST14_ES #CADPOWERKEYLST15 #CADPOWERKEYLST15_DE
        #CADPOWERKEYLST15_ES #CADPOWERKEYLST15_PTB #CADPOWERKEYLST16 
        #CADPOWERKEYLST16_DE #CADPOWERKEYLST16_ES  #CADPOWERKEYLST16_PTB
        #CADPOWERKEYLST17 #CADPOWERKEYLST17_DE #CADPOWERKEYLST17_ES
        #CADPOWERKEYLST17_PTB #CADPOWERKEYLST18 #CADPOWERKEYLST18_DE
        #CADPOWERKEYLST18_ES #CADPOWERKEYLST18_PTB #CADPOWERKEYLST19
        #CADPOWERKEYLST19_DE #CADPOWERKEYLST19_ES #CADPOWERKEYLST19_PTB
        #CADPOWERKEYLST20 #CADPOWERKEYLST20_DE #CADPOWERKEYLST20_ES 
        #CADPOWERKEYLST20_PTB #CADPOWERKEYLST21 #CADPOWERKEYLST21_DE
        #CADPOWERKEYLST21_ES #CADPOWERKEYLST21_PTB #CADPOWERKEYLST22
        #CADPOWERKEYLST22_DE #CADPOWERKEYLST22_ES #CADPOWERKEYLST22_PTB
        #TRANSFERKEYLST 
        LicFilePath CADPowerPath FID
        )
        
  ;; ===========================================================================
  ;; Пользовательские данные - изменить в соответствии со своими параметрами
  ;; ===========================================================================
  
  ;; Путь установки CADPower.
  (setq CADPowerPath            "C:\\Program Files\\Designsense\\CADPower22_EN")

  ;; Версия, для которой генерировать лицензию.
  ;; Допустимые значения: 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22
  (setq CADPowerVersion         "22")
  
  ;; Язык. Допустимые значения: 
  ;; - для версии 12: EN, DE, ES, RU
  ;; - для версии 13, 14: EN, DE, ES
  ;; - для версии 15, 16, 17, 18, 19, 20, 21, 22: EN, DE, ES, PTB
  (setq CADPowerLanguage        "EN")

  ;; Тип лицензии: 
  ;; - "Portable"/любое другое значение для версий 12 и ниже.
  ;; - "AppKeys-On-Computer", "SerialNumber-On-Computer", "AppKeys-Internet", 
  ;;   "SerialNumber-Internet", "Floating-On-Computer", "Floating-Internet" -
  ;;   для версии 13.
  ;;    "AppKeys-On-Computer" - лицензия по номеру, сгенерированному программой;
  ;;    "SerialNumber-On-Computer" - лицензия по серийному номеру автокада;
  ;;    остальные варианты не проверялись.
  (setq LicenseMethod           "SerialNumber-On-Computer")

  ;; Путь к floating-лицензии. Не проверялось, лучше не трогать.
  (setq FloatingLicensePath     "")
  
  ;; Платформа. Допустимые значения: "AutoCAD"/"BricsCAD".
  (setq OperatingPlatform       "AutoCAD")

  ;; Серийный номер AutoCAD (можно посмотреть в меню Help -> About).
  (setq SerialNumber            "000-00000000")

  ;; Ключ компьютера, сгенерированный CADPower. 
  ;; Узнать можно в меню CADPower -> Display Application Key...
  (setq ApplicationKey          "000-000-000-000-000-000-000-000")

  ;; Данные, отображаемые в информации о лицензии.
  ;; Можно заполнить любыми значениями.
  (setq 
    UserName                "nkAlex"
    CompanyName             "" 
    Address1                ""
    Address2                ""
    Address3                ""
    City                    ""
    State                   ""
    Country                 "RU"
    ZIPCode                 ""
    Telephone               ""
    Fax                     ""
    Email                   ""
    LicenseType             "Free"
    NumberOfUsers           "1"
    OrderNumber             ""
    OrderDate               "01.01.1900"
    LicenseFor              ""
    ACCM_Comments           ""
    CLIENT_Comments         ""
  )

  ;; ===========================================================================
  ;; Дальнейший код не изменять!
  ;; ===========================================================================

  (setq
    ExpireAfter             ""
    StartDate               "04.04.2015"
    ExpiryDate              "10.10.2029"
    DelayTime               ""
    HowSold                 "AppKeys"
    AppKeyType              "Disk"
    SteelWorksLicense       "Yes"
    Geological_License      "Yes"
    GUIDCheck               "No"
    FloatingLicenseDialog   "No"
  )
  (if (/= SerialNumber "")
    (setq SerialNumber (strcat SerialNumber "," UserName))
  )
  (if (/= ApplicationKey "")
    (setq ApplicationKey (strcat ApplicationKey "," UserName))
  )  
  
  (setq #CADPOWERKEYLST12 (LIST "oejfhosdjf9iugerjf9wpijeri045tu09ue0f9w" ";ocikspdoico9u987y6rf5d3sxzx47t98yupupf" "efify873te6te8w7hdf8ehfoidsmfjdpofjdpor" "9u9u9u5Ju8yu5*YH&G7tfg&^tgf*&g*h98H8uhi" "98yh78g67r$%E%$W43s%$D^%F&^G*&h98j98jks" "8yu8y&^R%^R%$ED%^$FD%^F76g87g87gh87hkj8" "OIHUN*HYFTYfuybgiunhuinhionjmomihNUIHug" "%R%^$E$%s43s43S$S%$ED^F87g87h98hu9jukkd" "POMUOJIHUGYD65f56f65fuyg8uyhgiuhiunhiuh"))
  (setq #CADPOWERKEYLST12_DE (LIST "hyoihihuihiuHIGYG&GyGH*H*F%$EFIUHIUHHkw" "*Y*&T^R%R&T&Y2*U2IJMIJOJNHGUFTYDRDGFUGI" "*YUGYFUGIHOIJ4JPOIJPOJOMJMLKJLMKJLMKJLr" "UIGUGBYFTDXCRFCBUBGINJNHHLKMJNLK<JMLKJi" "jo98uy7t65yrsce5sc5df7tf8hujoijomjkmpok" "8nhy7gb6f5dr54ed$%EDF^%&B^TGB*YGBUHjhj8" "a8N*U*sY&^T^&RFGIUNHINJINHBYGFVCTYGHJKg" "&T^&F%^DRC^%RF*&GHNUHONIjoinjonjinhnuih" "ONHONIHBNIUGB&V^TF%CDFGB NUHLMMJLOJKKlk"))
  (setq #CADPOWERKEYLST12_ES (LIST "jckjifuuiekekif7d6tatghau28e9iodfkjreoc" "iouhOHG7yhinhoijo9u7t65r45d54sddcvfuhjk" "o98nutyg6r5rcv5fv76fTYGYGubybgbyugfrtdu" "19398idkskkjskmvkblgh.h.l,mojomloyotorf" "87t6g67td76wgtsduhdsoijoijoijoihjihhjlf" "ergfoiyfowufosfjxdkfhjgys6etw38y0tuyrtj" "OINIHBUGYTFr76ty98u98y76r5e4s45sccvbnmk" "iuioy6r57yhnhyfTEd4esdFD&ggh9hoihjhihho" "98n876t65re564ec56fb8yhhuolijonihuhbkjj"))
  (setq #CADPOWERKEYLST12_RU (LIST "fu9efu8yr84ut3ieyh3ywgtyfvtyftdtrDtyUdY" "BYGHIUHINHIHUGIUHUHiugIUGiugyiuguigiuiu" "refdfidsjfoidsfjo43ur23y832ye8uwuwpd2iu" "01234567890poiuytrewqasdfgghhjkkllkjnbv" "/.,mnbbvccxxzzsdfghjkjkii88765433wwqqqq" "qwe4556yuil;';ll,,mmnnbvfdssaaqqwweeerd" "23rtyui98hhyhjykuilujfggdfvdsfsfdddassd" "jhj,mukliulk7i76u6y4tgerfscdbfgnghjyjyj" "iuyyuftcrdrdewaxedevtgiujhoijoijoijoijk"))
  (setq #CADPOWERKEYLST13 (LIST "IUNHIUHNIUhniuhniuhnughbygi723y2873y947" "7ubgt67rvf65ed54ed%$^D^%RF^&F&^G876ghjh" "^%$DE$W$#WE%$E65rf7gb8yhuhbgtyfrdrfvyvf" "INHIU BHHIUhiuhoinmjoimnjhnugbuyfvtyf7h" "O NHUJNIHBUGYBBIUHIH987y76t65r6fbugujkf" "5433dc45dv6f&^TGBY*G*YgyubgUGBuygbbiugu" "o9n8uhuGBUGBUGYBNI]hyniuhniuHBUGBuygbug" "onhuiouhniuhnoijhoijIUY*&y786t67tfb87gh" "908um09u98y876b6fVB^&TGFVB&^TGbgb8nyhgj"))
  (setq #CADPOWERKEYLST13_DE (LIST "&^%RV%^$D%Vfb8ngnhinh87bG&^GF76tgbhhint" "%$XC#SW$#S^FB7gtnmhniuhoniuhoinhinuyghi" "21a43xax4wsv6cdv6brf7b6tgB*NG*BYG8bnhij" "HOIJOIMJIUHBUgyubytguytgftdetsdfguiuh69" "IUhiuhuihoihnihniughiugbuygbuGbuygbuygf" "rf7vtfrtDRFVYRFuygbuygbuyguygu652r3hd98" "TVFYTFVBuygnihunomihunhyugbYTgbtyguyjhu" "&^V%R%^CED$D7b6tgnyhnmuhjnhy7bgtfvytrfv" "TXEDF&BGbnyhgiuyhniuhnIHI]gbn]ihbIYhnbi"))
  (setq #CADPOWERKEYLST13_ES (LIST "jodjfdfoiug384yur837rywfjefjgke0gke-0gt" "vkdvpofo9u89y6r76f&^F%^F7FBG*BGhinuhokk" "*IY*&V%RC^%$DC^%D^^FGVDCECVB$Ngh87hjn9s" "^&VRF%^DC$%EDfb87g87hyuh9njuonijojokkjh" "O NHUJNIHBUGYBBIUHIH987y76t65r6fbugujkf" "^V&FR%CD$%DGUHIOUJOJOKOJojoijoijoijuygd" "UB&V^F%^D$%SDFBNGMUNHJOIMJOIMJOIJOIUJOj" "&^V%RF%^CE$%#WSC%DR7gthijuoijkuoiuhniuh" "^%CDC%$SCDFB&GNIuhominhjomijomijoimnh86"))
  (setq #CADPOWERKEYLST14 (LIST "9937920989e8kfu9e8d8d" "987268y8yw8hyhgtydrtf" "pomkihi87y87t78t64e8o" "8532332ewergtrtty678i" "hjyukuk8oo9o8756y455t" "34rwwgrhnyuk78i66u56r" "utyheg3t4t45y67u67u6t"))
  (setq #CADPOWERKEYLST14_DE (LIST "7huihinwheriwhfiunhef" "56y6754tu439ruedjscji" "9i98uhsdinhsdljdcsdvt" "o9ugtrfygw8e7y87y98hw" "kuhchdnsckjnclksdjvdf" "87i6hgrgfdvsdbghmhjm8" "98yu8yuftfhkjiljihftf" "098j8uhitgytrfvytfr5e" "KJHJHiuyhiuhihu676tvi"))
  (setq #CADPOWERKEYLST14_ES (LIST "87yygtguygiuhesdwee38" "65y54unuhUGbuygugyUY" "8776R6FVYGUGugGBIUGBU" "UYGBFCTFUghuhHIH76549" "%crtrdUYGI7YYOJLOIJGI" "87G5RFBUYGgjhgJBGJGB8" "TVTDCTfyfUYFUYGUYG7Of" "yttfVYFGUBGHIUnhinuH5" "5nuybYGBHKNhkjHBJGJYJ"))
  (setq #CADPOWERKEYLST15 (LIST "kjnkdajdjoweruodijlsk" "ijiouSGSrd5fSGShkjkjf" "98u8y65rf5crtdubygunh" "yt5r54xSsc5dybgiuhkji" "8nyiuSGbGdySSuhkjnkjt" "5ec54c5d7tuhoijlijlke" "453xwSGytfuukhjlkjlii"))
  (setq #CADPOWERKEYLST15_DE (LIST "54xaxwreSRGbgiuhlij,h" "o8yu765f54ex5cfubygku" "54ex43w4tdfuygijhlkjh" "testfuGHhRkThinhijhnj" "i876t64d543wx54se65r7" "56dytfRGgibjnjRGFjnlk" "yguhijokDGmlkjlDDG;kj" "654e53e6t8yhiujhlijhj" "fugiuhkjhkjlkjhljkhgu"))
  (setq #CADPOWERKEYLST15_ES (LIST "67r654ed65r87yiuhkjkj" "i87bu7rv67fiuhoijlj;d" "iybftvubgihuoijj;lkkk" "uvyfuygijhoijlkj;lkjk" "65r87y9u0p9i[i,;kmlkw" "ign8iuijp,oiPOKPOkpok" "nuhniuhuygbNHinohuouH" "yttfVYFGUBGHIUnhinuH5" "87y8yhouhoitr6tfoiuhi"))
  (setq #CADPOWERKEYLST15_PTB (LIST "oisuhfsifjlksdfnjlsdk" "099u87yhgbyutginhblkm" "543wx54s65rf7tgnuhkjj" "87b675rv5r8hmiojomikw" "765ec564cefbyughujhjj" "43wd34ws54dvytfguyghj" "5cvyfrbuyginhkjkhihuy" "53e65fyhoimjlmijlmjkk" "3wcx5w54edvytfgunyhgk"))  
  (setq #CADPOWERKEYLST16 (LIST "ouj8hubtf6giojpokpokd" "fgnhjukitergfhmhgmymh" "*&*NHunnunuhoijigyugj" "&^B^FV&^Ghuomijmjlmkh" "876t65ec5fbyhmoiujo,i" "34c3xsv5fbuyginuhjkoj" "%$EC%DV^fbtgbugbujnok"))
  (setq #CADPOWERKEYLST16_DE (LIST "765rvc6cw54ED^VB%rf&B" "76vdrcfYBGIHUhinhmlkk" "^%C$^%CF7bgniuhnilkmj" " iy ijnoJIMOIJmoijmoI" "453cs3xsvrfbygUYniuhd" "&^VECCFBUYgniuhnijhni" "^VRFbnygniuhIHmonjmno" "54ved6rbtgNMYUhmoiuhm" "4cdbvtfnuyhNMIHMOijks"))
  (setq #CADPOWERKEYLST16_ES (LIST "5x3s65rf7t6g8y7nhoijm" "rhrjjtrjuy53wt4tefwef" "w46u67jyukhfdgawgt4tf" "%^V^$CF76tgb87ygn8yhs" "vr7fyhMOIUJMOIJmoiJpo" "654cd65f7BNGNUygniuhd" "543cx32a3DVBRFBtgbnyg" "564cdtgNYHNiuhnihuONi" "87hmji,oiJMOIJMOijopk"))
  (setq #CADPOWERKEYLST16_PTB (LIST "oisuhfsifjlksdfnjlsdk" "099u87yhgbyutginhblkm" "543wx54s65rf7tgnuhkjj" "87b675rv5r8hmiojomikw" "765ec564cefbyughujhjj" "43wd34ws54dvytfguyghj" "5cvyfrbuyginhkjkhihuy" "53e65fyhoimjlmijlmjkk" "3wcx5w54edvytfgunyhgk"))
  (setq #CADPOWERKEYLST17 (LIST "87^&Yn87Y8yJO*YUJoiuo" "I&BT^BIynIUYniuynoiUu" "%$R&^TB*TNIYniuyIyINY" "UYTFIUYgnUnIUIyniuYIy" "ytFBUTBIYGNIUYGIYIYYR" "BTUBYGYGKNYGNKynkynyy" "yvrfUBTFBytBYTBuytBUY"))
  (setq #CADPOWERKEYLST17_DE (LIST "7y7yUYNUhiuHNuhkjhnkj" "rtdvtFYgGNHkjhjhkjhjj" "^$E$%e56Rbtybuyguyjkj" "VFUBygnkhnkjhnkjhkjhj" "453cs3xsvrfbygUYniuhd" "JBGYNuhmlkjmkjhmkjhlk" "ybftYGNkjhNKJhNKJhnkJ" "vyftGUNygnYGnkUJHNkuh" "BHGnkuhNKJHMkjhKLjhmk"))
  (setq #CADPOWERKEYLST17_ES (LIST "*&^&Nyuimoijioubiugyi" "ibuyghniUHNOiuHOIhjmo" "nhiuyhNUIHmlJHMLkjlkj" "YVCRDUYGNuhknhnkjjlkj" "FTgbnuygnkHNkjhnkjhnk" "VFUbygnHNKJhnkJHnjkjj" "JBGJnhkjnhlkjhkjhkjhj" "UBGYnuhkjHNkjhmkjhkjj" "bygnUHNkjhnkJHNkjhmKJ"))
  (setq #CADPOWERKEYLST17_PTB (LIST "UHUHNIUHKUhuihnkhkjjd" "7yn7yNyOIUmoiumijlmii" "TUFVuybgnuhkjhmkjhkjj" "y5cdytbfgBunhNHknjkmj" "y54rytUBYgnuygIUhkuhk" "54cdyvFUBYgBYGyuniuyn" "5dtvfuybgYIUGIUNHUIUR" "yvrftyBFNGUNHUNHKJMJK" "5cryvTFBUYGnbyugUHKNH"))
  (setq #CADPOWERKEYLST18 (LIST "576876t7YHUH56r54dgjk" "434e7r8&^TYt9*&T&T*&^" "edfr&^%r76tUYUGkgjthj" "43e654rTFt976t987yoiu" "#W%#w64e&^%ruytiuytku" "43e%R65r^T976t987y098" "$E&^%T7t987t97587y987"))  
  (setq #CADPOWERKEYLST18_DE (LIST "987yu87ttftrfghvhjkhH" "65r6TYY8hkjgjhCgfck76" "2*098u8Yq87y7y987YOIH" "o8u23Y987y97y978y97r5" "987y8yY&T^fytf8yughlj" "^%R76tuygiuhyoiu&UHpo" "798&YUh9uf65fghljhkkj" "56rT27t6E76fYgiuygiu" "987y1&Y&t8r74ertfjjg"))
  (setq #CADPOWERKEYLST18_ES (LIST "14*&98IOTGYGkjgDUGKHB" "*&YTFgguygiufytfjhkjh" "543eRFtfiuygtiyugiuyh" "$ESRDtfuyGYIUYTYUOUHY" "*3YT6fYq7yftrddhgfh" "3etrdUTYFuytr876t979i" "o98u7tfTFYUgoiutyduyt" "4e&^%Rytoiy&Yoiyo7yO7" "4r*^t987ty2&y08yfIu"))
  (setq #CADPOWERKEYLST18_PTB (LIST "987y876r^%R76Ta*7t987" "76t86r*Td7yO*&y987y9" "87y*&Y&^tYTGyudrtufuu" "76t*y98Y2y8yufkfgijy" "r67dR9707y087y*G987t9"))  
  (setq #CADPOWERKEYLST19 (LIST "ihoihoioh87huygutygiu" "y6tu67i8ytnfghseheger" "ouhiufufuh9pijpokoijf" "454rwet67uyhthghhfhfh" "oihouihoiUHUIHIOUHoil" "rthgijiouhOIUHOIUHOIU" "ugiuGIUHIUoiuhoiuhihk"))
  (setq #CADPOWERKEYLST19_DE (LIST "78yygytfgiuhuyggiuhhh" "43w3sedxytfuygihubujj" "98u76r5dtygihoijhojhu" "utrfutghujklnkjjkjhjh" "yrdytfihoijlkjjmlkjjj" "3w3d7tgiyuhlkjkjnhkjj" "wserdutgiugoiuhlkjnkj" "erdutihjnknkjlhjklkj" "uhuHUHOIUhoiuhoiuhou"))
  (setq #CADPOWERKEYLST19_ES (LIST "876tT876T7y7y76t67669" "tgiuYGUYgugyuGYUGIUYG" "54E576FT876gyihiygiuy" "54D5R756F86TU6tt8tyiy" "YHUHoiuhOIUhoiuHOIUhj" "76t65r76T876t76766776" "ftygGiuygGIUYGiuygiyu" "87Y987Y8hoUIHUIHLKJUH" "7yyhiuhkihiuhiuhuihji"))
  (setq #CADPOWERKEYLST19_PTB (LIST "87y87hu88uh8H8887y787" "uyggigyiugi7o8y7t67yk" "urf54ftgiyuhiuhluhllj" "64e57r6TF876ti76ti67T" "87Y76R68t876tg7y87y78"))
  (setq #CADPOWERKEYLST20 (LIST "difujhod9uf87ufjeifje" "98u98y7&G7hiuHuoihoiu" "5r67f^g8yhOUHouhOiuuw" "%$e65R876ghOuhouihiuy" "4E45e&%rygiuhOUhiuygy" "&^%FtfTYGGuiyhguygiyy" "%rdtyGiyugIUygtygiuyh"))
  (setq #CADPOWERKEYLST20_DE (LIST "iuyhiuh87gyiGYiuGiuyg" "%RFTgiyyuGI^FD&Ruygiy" "%ED^%$EfYIGIYGYTHJVGY" "$ERFUytfytgfytfTuytrh" "^&RY%$RFYGIYUFUYTFYGG" "^%RDFUTYFGHHHVJHGVHGG" "YRFUGVKJHBKGhbkjhg67i" "YTFYTdytrfuyfTGFgiut" "%$#W%$ED7rfuytfyughy"))
  (setq #CADPOWERKEYLST20_ES (LIST "*&^T*&^T^TGIYG976t677" "^%$R&^t876t876t97889u" "#E^$#E75rf*^&T*^FRYYq" "(*U&(*&^978hOIUHoiuhk" "78y98&Y&GiuHIUhIYFTYw" "O*&Y987t&YGiuHGIUhgOI" "IUHOIUH&^guyhjug,hgdu" "*^R*&^TIygIUGYYKJHGKJ" "U^RFUYGKgkuygiugyljsd"))
  (setq #CADPOWERKEYLST20_PTB (LIST "*&^*&tyi&YI&^TFGjghkj" "^RFUTGKYG*&GIUH<JBKJH" "YFKHBLKJHBJGlkjhoi7y9" "TFU^%RYGiuHOIUHOIUIU2" "IYOIUGKUYFGKJHgkjhyg6"))
  (setq #CADPOWERKEYLST21 (LIST "iuynguytfgUTYFUYTfutw" "UBtfgu&*^T&^T&R^%gtf8" "7bv6%RF&B68f7t6g8bn67" "BFUbytfUBytfuytfbuyty" "V^%Rd675RF7vb6tfUbvtf" "FBUVtfUBtygiNBGYubyyr" "65r45646547^%R$&^%R7h"))
  (setq #CADPOWERKEYLST21_DE (LIST "i87yiughiuyghiuygiuyg" "765gr7BUGTygbUyguiygu" "7b6trBNgttibnYGinbyuu" "nby67gNyhInyuhinuhyin" "BFYRFD%redf5rfyutfyut" "n*BYnuHOmnuhONihuoniu" "B&^t65EF54E6f54&^B5tr" "bniGYINyugINyugniyug" "VYtrfytFbuytGFBuytgu"))
  (setq #CADPOWERKEYLST21_ES (LIST "6t7^TYNB&Yn78y98n7yu4" "G&B^T^%vtf7yghknhhjkh" "NB*Y*&yIN*uhyi*Nu7hyi" "&VB^%trf7bnyGIUbygiby" "B&^tfgu7GNiyuGHINyugi" "B&YgINyughINyuginyugy" "BU ytgfbuYTGYIGNByugn" "BGINygINyugniyugniyuu" "GBUGYinyuginyughiu765"))
  (setq #CADPOWERKEYLST21_PTB (LIST "67ty7yhn7yhin7yi7u777" "tfuBYGFuytgBUYgIUyngi" "^VB%RF765tbguGYbiyugi" "B&TguybGuiygiyugiuygu" "V%RDv7b6Trfbntuf7btyy"))
  (setq #CADPOWERKEYLST22 (LIST "876t76vbr5f87gy9ouho9uj98ujmopijomnihunoimjupmoi" "f7b6tftc4eedf76ugnmiuhmoiuhjmoiuhniuhnmiljhnmijh" "tfuybGubygtfNIGYNihMNouhyniyuHNhyniUHomiuj;o,jkm" "IUBYGFYvtrf%^$CE%$#ED76utf8&^tgb8&^T*nb7tyibnygh" "^%$E54W5342wD%$3e5dvB%r7b*^Tf87GYn987GYBNIuygb8u" "V^R^%C$ED54W#DE%6c4eF^%$VRF&^BUGJBGYIugybujhbniu" "B&V^trf&^TGfb&YGNiHUiuhinuhynIMhyugbu76gt6vb7rug"))
  (setq #CADPOWERKEYLST22_DE (LIST "*B&^tf76%Tg87GH3MN*hu7i8nY*7hniuHNMsIUHy98y" "V^B%R65RVB&^5tf8BN&yh698&HNIs@nhiuihniuhyun" "FV&B^r5^V%$ef^$CR%Vf86BFG*n7b6gtuBgybIUGBYi" "&BV^R%F^%RFB*&gtn&*M&hynioUibgyBIgbuUygugiu" "B&V^5r^&5rvVB&^*&GtNHYuiHiNiNiuHNIuhnyiuyIU" "*BN&%VRv76%VBFTYTGnimHUnibUGYBuiygIgbyyujgy" "NB^&t&^%gB^FG87YGoh9mnuHNMJIuIGNgyuIBGbyuoi" "BTfV&^TFgIBNGyiUHNINGYiybGIbugyIbyuBIugbyu7" "N6t&^BVR%G^%$EFv^%TNG98&**NHTG%$wd%$DS5o87"))
  (setq #CADPOWERKEYLST22_ES (LIST "65r%^RE$%3ef^%&RE%$C3e5FG*^7gti76gt87y6g8t76" "VC^%$E54#e5&RFB^87tgnBI^&gtbin^&GYinbhginbhy" "C%$%E%43e*^Tgi7NGyi8nHUIUBgiubGYUIByiGUBGyyb" "CV%$E53X$WDCSv6d54BV&ntufgIUyngiUNHo8uhmm0iu" "N5*y76*&BTg675G&^tg87y6giUhyniuhynihyuiyuh67" "*B&^T6&R%F56$CEDF7RFGU&gty3*N7yj98&HT56$E%iu" "V^%RF^%C$EF654fR^&ftgnUGynihyuniygbuuytfvgyn" "8bn^&T&^5rgF%$vfr7%^TGF6ubGHynuHJIuhniuhuiju" "C^EdCTERDteDCVytFBUBygti7u6gt876tr7g65gt87gh"))
  (setq #CADPOWERKEYLST22_PTB (LIST "98nyg7765t*^tr76Tn978ygn897gybu76tno98uhyiy7" "F&VB^%R65VRF&B^5fb*N&tg68N^&*T&6gt8ib87t6g78" "V&B^%r^%V$rb76%Vb87bGNIbGU76tg8GBu76vgt87y6s" "B*N^&T76vbFB*7bgN*&NGBuv6ftgB*INygtuygtfbyuo" "*BN&^Tr6%C$EF57bvDFb76t8nguybgUYgtbgtyyugniy" "8b76t76BGFVBY6frUgniHigbGUbyvgUYgubygUbyguyg" "&V%R^%VRF%&fgtbUBYgIBNygINBG*&YGIYBIUHIUNMOI"))

  (setq #TRANSFERKEYLST (LIST ".v,v;;gph0684ik3jdhxnmzzbxvgfg21y628405-08=o=oo']opp]k'j;.n,kfxjsyyweyteueirecwerby]" "jjuusu8e87UUahsyyewwsiisuJJL::>>}}[{Psw0w99282uuwjkske4kieeijujjl;l;;WLEIIWO9uoiu8" "kfkfid9s8a89IAI9D48U8IoASODKKkjisir9r8r84i3jkekdoflt;yj''kk/hf./r.r,dl,lL;;P234xs2ws" "DIR993828JSJDJCJFIDFLG;H;'X'';as;;el;fltpt;t;t;y;y[u[uy]6]5=5-30291817w6ayzh" "fot0604e's'lfuahsyw72uwjkekklrlktkri38w8dufkkajjJSJJFHSHASNnJUIIWIIisii2929ec3r43f"))
  

  (vl-load-com)
  
  (cond
    ((= OperatingPlatform "AutoCAD") (setq OperatingPlatform2 "_AC"))
    ((= OperatingPlatform "BricsCAD") (setq OperatingPlatform2 "_BC"))
  )
  (setq LicFileName (strcat "CADPowerUser" CADPowerVersion "_" CADPowerLanguage OperatingPlatform2 ".rgs"))
  (cond
    ((= CADPowerVersion "12")  
      (cond
        ((= CADPowerLanguage "EN") (setq #CADPOWERKEYLST #CADPOWERKEYLST12))
        ((= CADPowerLanguage "DE") (setq #CADPOWERKEYLST #CADPOWERKEYLST12_DE))
        ((= CADPowerLanguage "ES") (setq #CADPOWERKEYLST #CADPOWERKEYLST12_ES))
        ((= CADPowerLanguage "RU") (setq #CADPOWERKEYLST #CADPOWERKEYLST12_RU))
      )
    )
    ((= CADPowerVersion "13")  
      (cond
        ((= CADPowerLanguage "EN") (setq #CADPOWERKEYLST #CADPOWERKEYLST13))
        ((= CADPowerLanguage "DE") (setq #CADPOWERKEYLST #CADPOWERKEYLST13_DE))
        ((= CADPowerLanguage "ES") (setq #CADPOWERKEYLST #CADPOWERKEYLST13_ES))
      )
    )
     ((= CADPowerVersion "14")  
       (cond
         ((= CADPowerLanguage "EN") (setq #CADPOWERKEYLST #CADPOWERKEYLST14))
         ((= CADPowerLanguage "DE") (setq #CADPOWERKEYLST #CADPOWERKEYLST14_DE))
         ((= CADPowerLanguage "ES") (setq #CADPOWERKEYLST #CADPOWERKEYLST14_ES))
       )
    )
     ((= CADPowerVersion "15")  
       (cond
         ((= CADPowerLanguage "EN") (setq #CADPOWERKEYLST #CADPOWERKEYLST15))
         ((= CADPowerLanguage "DE") (setq #CADPOWERKEYLST #CADPOWERKEYLST15_DE))
         ((= CADPowerLanguage "ES") (setq #CADPOWERKEYLST #CADPOWERKEYLST15_ES))
         ((= CADPowerLanguage "PTB") (setq #CADPOWERKEYLST #CADPOWERKEYLST15_PTB))
       )
    )
     ((= CADPowerVersion "16")  
       (cond
         ((= CADPowerLanguage "EN") (setq #CADPOWERKEYLST #CADPOWERKEYLST16))
         ((= CADPowerLanguage "DE") (setq #CADPOWERKEYLST #CADPOWERKEYLST16_DE))
         ((= CADPowerLanguage "ES") (setq #CADPOWERKEYLST #CADPOWERKEYLST16_ES))
         ((= CADPowerLanguage "PTB") (setq #CADPOWERKEYLST #CADPOWERKEYLST16_PTB))
       )
    )
     ((= CADPowerVersion "17")  
       (cond
         ((= CADPowerLanguage "EN") (setq #CADPOWERKEYLST #CADPOWERKEYLST17))
         ((= CADPowerLanguage "DE") (setq #CADPOWERKEYLST #CADPOWERKEYLST17_DE))
         ((= CADPowerLanguage "ES") (setq #CADPOWERKEYLST #CADPOWERKEYLST17_ES))
         ((= CADPowerLanguage "PTB") (setq #CADPOWERKEYLST #CADPOWERKEYLST17_PTB))
       )
    )
     ((= CADPowerVersion "18")  
       (cond
         ((= CADPowerLanguage "EN") (setq #CADPOWERKEYLST #CADPOWERKEYLST18))
         ((= CADPowerLanguage "DE") (setq #CADPOWERKEYLST #CADPOWERKEYLST18_DE))
         ((= CADPowerLanguage "ES") (setq #CADPOWERKEYLST #CADPOWERKEYLST18_ES))
         ((= CADPowerLanguage "PTB") (setq #CADPOWERKEYLST #CADPOWERKEYLST18_PTB))
       )
    )
     ((= CADPowerVersion "19")  
       (cond
         ((= CADPowerLanguage "EN") (setq #CADPOWERKEYLST #CADPOWERKEYLST19))
         ((= CADPowerLanguage "DE") (setq #CADPOWERKEYLST #CADPOWERKEYLST19_DE))
         ((= CADPowerLanguage "ES") (setq #CADPOWERKEYLST #CADPOWERKEYLST19_ES))
         ((= CADPowerLanguage "PTB") (setq #CADPOWERKEYLST #CADPOWERKEYLST19_PTB))
       )
    )
     ((= CADPowerVersion "20")  
       (cond
         ((= CADPowerLanguage "EN") (setq #CADPOWERKEYLST #CADPOWERKEYLST20))
         ((= CADPowerLanguage "DE") (setq #CADPOWERKEYLST #CADPOWERKEYLST20_DE))
         ((= CADPowerLanguage "ES") (setq #CADPOWERKEYLST #CADPOWERKEYLST20_ES))
         ((= CADPowerLanguage "PTB") (setq #CADPOWERKEYLST #CADPOWERKEYLST20_PTB))
       )
    )
     ((= CADPowerVersion "21")  
       (cond
         ((= CADPowerLanguage "EN") (setq #CADPOWERKEYLST #CADPOWERKEYLST21))
         ((= CADPowerLanguage "DE") (setq #CADPOWERKEYLST #CADPOWERKEYLST21_DE))
         ((= CADPowerLanguage "ES") (setq #CADPOWERKEYLST #CADPOWERKEYLST21_ES))
         ((= CADPowerLanguage "PTB") (setq #CADPOWERKEYLST #CADPOWERKEYLST21_PTB))
       )
    )
     ((= CADPowerVersion "22")  
       (cond
         ((= CADPowerLanguage "EN") (setq #CADPOWERKEYLST #CADPOWERKEYLST22))
         ((= CADPowerLanguage "DE") (setq #CADPOWERKEYLST #CADPOWERKEYLST22_DE))
         ((= CADPowerLanguage "ES") (setq #CADPOWERKEYLST #CADPOWERKEYLST22_ES))
         ((= CADPowerLanguage "PTB") (setq #CADPOWERKEYLST #CADPOWERKEYLST22_PTB))
       )
    )
  )
  
  (if (or (not (eq 'exrxsubr (type dos_encrypt))) (not (eq 'exrxsubr (type dos_guidgen))))
    (progn
      (princ "\nError: DOSLib not loaded!\n")
      (exit)
    )
  )
  (setq LicFilePath (strcat CADPowerPath "\\" LicFileName))
  (vl-file-delete LicFilePath)
  (if (setq FID (open LicFilePath "w"))
    (progn
    )
    (progn
      (princ (strcat "\nError creating file: " LicFilePath "\nCheck if folder exists!\n"))
      (exit)
    )
  )
  (write-line "" FID)
  (write-line "[CADPower Registration]" FID)
  (write-line (strcat "CompanyName             " CompanyName) FID)
  (write-line (strcat "Address1                " Address1) FID)
  (write-line (strcat "Address2                " Address2) FID)
  (write-line (strcat "Address3                " Address3) FID)
  (write-line (strcat "City                    " City) FID)
  (write-line (strcat "State                   " State) FID)
  (write-line (strcat "Country                 " Country) FID)
  (write-line (strcat "ZIPCode                 " ZIPCode) FID)
  (write-line (strcat "Telephone               " Telephone) FID)
  (write-line (strcat "Fax                     " Fax) FID)
  (write-line (strcat "Email                   " Email) FID)
  (write-line (strcat "ExpireAfter             " ExpireAfter) FID)
  (write-line (strcat "StartDate               " StartDate) FID)
  (write-line (strcat "ExpiryDate              " ExpiryDate) FID)
  (write-line (strcat "LicenseType             " LicenseType) FID)
  (write-line (strcat "NumberOfUsers           " NumberOfUsers) FID)
  (write-line (strcat "SerialNumber            " SerialNumber) FID)
  (write-line (strcat "ApplicationKey          " ApplicationKey) FID)
  (write-line (strcat "DelayTime               " DelayTime) FID)
  (write-line (strcat "HowSold                 " HowSold) FID)
  (write-line (strcat "GUIDCheck               " GUIDCheck) FID)
  (write-line (strcat "FloatingLicenseDialog   " FloatingLicenseDialog) FID)
  (write-line (strcat "OrderNumber             " OrderNumber) FID)
  (write-line (strcat "OrderDate               " OrderDate) FID)
  (write-line (strcat "LicenseMethod           " LicenseMethod) FID)
  (write-line (strcat "OperatingPlatform       " OperatingPlatform) FID)
  (write-line (strcat "LicenseFor              " LicenseFor) FID)
  (write-line (strcat "ACCM_Comments           " ACCM_Comments) FID)
  (write-line (strcat "CLIENT_Comments         " CLIENT_Comments) FID)
  (write-line (strcat "GUID                    " (dos_guidgen)) FID)
  (write-line (strcat "Floating_License_Path   " FloatingLicensePath) FID)
  (write-line (strcat "AppKeyType              " AppKeyType) FID)
  (write-line (strcat "SteelWorksLicense       " SteelWorksLicense) FID)
  (write-line (strcat "Geological_License      " Geological_License) FID)
  (close FID)
  
  (if (eq 'exrxsubr (type dos_encrypt))
    (progn
      (setq KEY 0)
      (while (<= KEY (- (length #CADPOWERKEYLST) 1))
        (if (not (dos_encrypt LicFilePath (nth KEY (reverse #CADPOWERKEYLST))))
          (progn
            (princ "\nError: Can't encrypt license!\n")
            (exit)
          )
        )
        (setq KEY (1+ KEY))
      )
    )
    (progn
      (princ "\nError: DOSLib not loaded, can't encrypt license file!\n")
      (exit)
    )
  )
  (princ (strcat "\nGenerated license file: " LicFilePath))
  (princ)
)
(keygen-cadpower-22)