//========================================== UKP USAGE TOTURIAL ==============================================//

FIRST STEPS:
 If you use UKAIP to patch your brand fresh IceWarp Merak server block SMTP access to icewarp.com and fully block access
 to licenseprocessor.icewarp.com with your firewall/router before you continue with this guide.

1)Copy UKAIP executable to your KWR/KMS/KCN/Merak installation folder.
2W)[Windows Only]
   Open cmd.exe(Command prompt) and perform:
   cd "Your-KMS_OR_KWR_installation_folder"
3)Generate license for your product this way:
  [KWR]
  ukaip86.exe winroute.exe -l license.key
  /ukaip_i686 winroute.exe -l ./license.key
  [KMS/KCN]
  ukaip86.exe mailserver.exe -l license.key
  /ukaip_i686 ./mailserver -l ./license.key
  [ICEWARP MERAK]
  ukaip86.exe {ONE_OF_SERVICE_PROGS,CONFIG_APP,SETUP} -l license.key
  ./ukaip_i686 {ONE_OF_SERVICE_PROGS,TOOL_APP} -l license.key
    Example: ukaip86.exe smtp.exe -l license.key
             ukaip86.exe setup.exe -l license.key(See below for installer notes).
             ./ukaip_i686.exe ./pop3 -l license.key
             ./ukaip_i686.exe ./tool -l license.key
4)Run UKAIP as following to patch KMS/KCN/Merak/KWR:
  NOTE: If your operating system supports it you can use native 64-bit binaries as well(i.e ukaip64.exe instead of ukaip86.exe
        and ./ukaip_amd64 instead of ./ukaip_i686)
  Windows:
   [KWR]: ukaip86.exe winroute.exe
   NOTE: If you want to use KWR with KWF with license file(Semi-Trial mode) then run as following:
          ukaip86.exe winroute.exe -force-trial-kwf-with-lic
   [KMS/KCN] ukaip86.exe mailserver.exe
   [ICEWARP MERAK] ukaip86.exe cal.exe config.exe control.exe fastisapi.exe im.exe pop3.exe smtp.exe sendmail.exe
   NOTE: To use the license during installation/accept license during upgrade you should patch the installer.
         Open icewarp-%version%-%date_and_build_in_nightlies%.exe installer(size ~ 70+ MB) with 7-zip and extract [0] file
         out of it. Now extract the contents of [0] with 7-zip to folder %MERSETUP%. Patch the %MERSETUP%\setup.exe(About 4-5 Mb in size) file with UKAIP:
         ukaip86.exe %MERSETUP%\setup.exe
  Linux:
   [KMS/KCN] ./ukaip_i686 ./mailserver
   [KWR] ./ukaip_i686 ./winroute
   NOTE: If you want to use KWR with KWF with license file(Semi-Trial mode) then run as following:
         ./ukaip_i686 winroute.exe -force-trial-kwf-with-lic 
   [ICEWARP MERAK] ./ukaip_i686 ./cal ./control ./icewarpd ./im ./pop3 ./smtp ./sendmail ./tool


SKiP This step for IceWarp UCS 10.X.
5) Run UKP as following to patch McAfee:
  Windows:
  ukp86.exe "%Relative_Path_From_Installation_Folder_To_AV_Plugins_Folder%\avir_mcafee.dll"

    Example for KWR:
     ukaip86.exe avirplugins\avir_mcafee.dll
  Linux:
  ukaip_i686 ./rel_path_to_avplugs/avir_mcafee.so

  NOTE:
   If you have your own local(LAN) mirror for mcafee you can use the following to enable use of it:
     Windows:
      ukaip86.exe "%Relative_Path_From_Installation_Folder_To_AV_Plugins_Folder%\avir_mcafee.dll" -use-custom-mirror-for-mcafee
     Linux:
      ./ukaip_i686 "%Relative_Path_From_Installation_Folder_To_AV_Plugins_Folder%/avir_mcafee.so" -use-custom-mirror-for-mcafee
     UKP will ask you for your mirror's DNS name and relative path to folder holding McAfee updates.

6) If you attempt to install WinRoute and you need functional WebFilter then:
  5a)Stop WinRoute service. 
  5b)Patch winroute.exe/winroute using UKAIP with -force-trial-kwf-with-lic parameter.   
   5b1)During patching step [11] yo'll get Trial-ID.
   5b2)Put it in your winroute.cfg file in <variable name="TrialId">PUT_HERE</variable> line.
   5b3)In patching step [12] you'll be asked to fullfill the E-Soft serial number.(You'll get it then time will come) .
   5b4)UKAIP will continue with patching and will generate getkey.php file in it's own folder.
   5b5)Put this file on your local webserver(With PHP enabled) in /kwfp0wnz/ virtual folder.
       NOTE: You can change the URL(default http://localhost/kwfp0wnz/) using -advanced switch with UKAIP
             If you want to use HTTPS(SSL) server then YOU must use CA signed certificate on it(You've been warned).      
  5c)Patch avir_mcafee.dll/avir_mcafee.so with UKAIP.
  5d)Start WinRoute service. 
  5e)If you've enter correct E-Soft license data then your WebFilter will be active stright after service starting.
  5f)Give Kerio WebFilter extension a try :)

7)License installation.
  Kerio: Put license.key file to \license\ subfolder in Kerio's installation directory
  IceWarp: Put license.key to \config\ subfolder in Kerio's installation directory
           NOTE to Linux users:
             LI1)Stop IceWarp daemon -> /etc/rc.d/init.d/icewarp stop
             LI2)Put generated license file to %install_folder%/config/ named as license.key
                 By default this path will be: /opt/icewarp/config/
             LI3)Start IceWarp daemon -> /etc/rc.d/init.d/icewarp start
             To test succesfull license installation do the following:
              LI4)In IceWarps installation folder execute: ./tool display system c_license_xml
                 If you see: c_license_xml=
                             then license has NOT been propertly recognized
                 If you see c_license_xml= A_LOOOOOT_OF_TEXT
                             then you've done it babee :)

8) Yo are done babee :)
  
NOTES:

Use -o option to prevent UKP from changing "source" file(All changes will be stored to a new file):

ukaip86 winroute.exe.ORG -o winroute.exe
File winroute.exe.ORG will be used as R/O Source while the changes will be saved to a new winroute.exe file.


MULTI-FILE Patching:
Cmd:
ukaip86 winroute.exe avirplugins\avir_mcafee.dll
Will patch both files during one execution :)

More complicated (Using -o):
ukaip86 winroute.ORG -o winroute.exe avira_backup\makaka.dll -o avirplugins\avir_mcafee.dll


And yet one another thing:

Special -autoquit option can be added if you wanna make some UKP automation(Exam: Creating a batch file) so UKAIP will not wait for your Keypress before terminating.



Cheerz ,ViTYAN :)