Posted on 05-09-2016 06:30 AM
I am trying to automate the installation of Kaspersky AntiVirus. Right now we manually install it on each computer and I shouldn't have to. The actual Kaspersky installation gets installed as it should because I just drag the .pkg into Admin. However, the Network Agent that assigns what server it looks for doesn't work. I had made a Snapshot and typed in our server, but from our console we can see the computer but it isn't talking with our server for remote activation.
Does anyone have any experience with Kaspersky and can lend a hand?
Posted on 05-09-2016 07:51 AM
First off, let me empathize with having the deal with KAV at all. I feel that pain.
That aside, the simple (And undignified) way we set KAV to deploy is to drop both dmgs into tmp (With their install scripts) and run the script attatched. With the Netagent you can run the script with -r arguement and specify your server, or just edit the script to include the URL and bypass that. (See http://support.kaspersky.com/us/12332#block3 for reference.) Both installs via script run silent, and afterwards our clients do check in to the administration server to acquire their license. I can't speak to snapshotting, but trying to include the install created config file in pkg deployments caused unknown errors in our sync. Possibly that's what you're seeing.
For reference, we do netagent then suite (Not sure that matters), as in previous iterations we used to push from the Kaspersky Admin, but that seems flaky with that last couple updates.
Hope that helps.
Posted on 05-13-2016 11:37 AM
@mccreedys Thanks, I am not sure if I fully understand some of your terminology and abbreviations. What is tmp and what scripts are they running?
I have the install.sh and when I put our server name in the -r argument and it returned an error. I am probably missing something really obvious. We ran the Kaspersky tool on our Admin server, but I don't know what to do next.
Posted on 05-13-2016 02:47 PM
Tagging for later. I, too, am interested in getting this to work.
Posted on 05-20-2016 01:59 PM
Sorry for the delay, I'll try to be less scattered.
For the netagent, I've wrapped the klnagent folder (With the script [install.sh] and dmg) inside a package that drops the folder on our client machine at /private/tmp (This is just because we clean our tmp spaces so the folder won't linger). Currently, I just have the script edited so that the variable assigned to IP points to our administration server in lieu of using the -r command. I've sometimes seen an error where the dmg won't mount if you don't first cd into the directory where it and the script are, though that's been rare.
Dropping the package (and the edited script) and running the script via Execute Command in the 'Files and Processes' section of the Policy has been working for us. It's a simpler command, not requiring any arguments so maybe that'll work for you?
Hopefully you found a better answer before I answered, if not, hopefully this helps. (I'll watch it closer next time.)
Posted on 05-21-2016 01:52 AM
I am deploying Kaspersky Endpoint Security successfully without any issues. I'll post my notes on Monday when I have access to them again.
Posted on 06-02-2016 05:26 AM
The way I found to do this was to edit the install.sh script for the NetAgent to specify the server using its DNS name. There is a field for it at the top of the script when you edit it. Following the post @mccreedys made about using the Kaspersky Installation instructions, I followed the Apple Remote Desktop Installation section. I used the Packages program to create the package for the agents three files. (install.sh, klnagent.kud, and klnagentmac.dmg) I followed Rich Trouton's Blog about making an Office install package. Here to make my package. By running the script as a post-installation script in Packages, it installs the netagent properly. I then took the setup files for the client and did the same thing and made a Client package that runs the install script post-installation as well. I then took both packages and made them one big installation package with the netagent installing first and then the client using the exact method Rich explains in his blog. It has worked perfectly in deployment. Hope this helps.
Posted on 06-07-2016 01:01 PM
Oops, I meant to post back here. Sorry about that.
I follow the same basic layout as @canopimp.
Kaspersky Network Agent
I add the necessary info into the install.sh variables, then add the files into Packages as depicted.
Kaspersky Endpoint Security
Since their install.sh file takes parameters, I create a postinstall.sh file that simply calls install.sh and add the files into Packages as depicted.
Posted on 06-15-2016 08:15 AM
I'm not clear on the postinstall.sh script calling the install.sh script.
Install.sh works for the netagent, but I get an error running the install.sh that installs Kaspersky.
What does your postinstall.sh file look like?
Ok, figured it out. This seems to work
#!/bin/sh sh install.sh
Posted on 06-15-2016 10:46 AM
Yeah, install.sh takes parameters and if it's run as a postinstall, Installer.app will pass a few things to it, but they are not the values the script is expecting, so it fails.
Posted on 07-28-2016 08:26 AM
Hey @mscottblake ,
I'm still trying to wrap my head around this and using Packages. In the install.sh from Kaspersky, what values can I change? I have the IP address and the server name that we use. Where in the script can I edit these fields?
Also, how can I add a post install script to run everything through Packages?
Sorry for so many questions, I just want to make sure I have everything covered. Scripting is a weak point that I'm trying to work on.
Posted on 07-28-2016 10:37 AM
@niacobelli If I remember correctly, the only thing I have to change is in the Network Agent package. Near the top, the
IP_ADDRESS field gets the address to the KES server.
In my case, I have
Posted on 10-20-2016 10:58 AM
@mscottblake] what is the program you are using in your screenshots to create your packages/scripts?
thanks - ernesto
Posted on 10-20-2016 11:26 AM
Posted on 06-23-2017 09:40 PM
Hi, i was able to install both kaspersky endpoint and net agent successfully. However, how can I deploy the license key remotely through casper. After installation through caspers it shows its not activated
Posted on 06-24-2017 06:35 AM
The installation files need to be made by the Kaspersky Server Console. This ensures the activation files are in place to point back to the server. At least this is how we do it. I have not tried to activate after installing with some kind of script or automation.
Posted on 06-26-2017 06:00 PM
Hi, I was able to activate kaspersky mac client via the kaspersky admin console. There's a way there to create a task to distribute the key file or activation code.
Posted on 01-25-2019 03:55 PM
Just wanted to thank you guys for the tips I got mine working a bit differently with the newer versions. Add the .key file for the client pkg and you avoid activation. Also the .ini file with the agent pkg and you will not have to edit the install.sh Also I had to just include install.sh for both and do a postinstall.sh file.
Posted on 04-08-2022 03:13 PM
For anyone that still is stuck with it. They officially don't support Jamf installs and refuse to even try. They say use your server to remote install after the fact. I get it working about every other version. I'm about two months from switching off them thank god.
Posted on 11-27-2019 08:02 AM
For the new version with Catalina compatibility, (Kaspersky 11), the "kav addkey" command is not working anymore.
As @Monkeyfist noted, you can add the key file in the same directory as the install.sh from the editor. It will search for something with a ".key" extension and use it to activate the license. The new command is :
kav LICENSE /add /Path/to/license.key
Posted on 04-09-2022 01:21 PM
I work with KSC + KESB (for Windows, for Mac, for Linux)
I do not directly install KES for mac by Jamf.
I use the Kaspersky agent package from KSC and deploy it to our Mac stations with Jamf by pushing it to /private/tmp/<agentfolder> and running a "run after" script to install it with the mandatory params (accept eula, mainly).
After that, the KES deployment is done by KSC through a scheduled task.
The licence key is set, in KSC, to be automacitaly distributed.
Beware the latest Monterey release which is no longer support python 2.7 : only the latest KES version (with patch C included) can be installed.
Ouf course, all configuration profiles (PPP, ...) are set at first.