Kaseya Community

Where can you write scripts

  • Hello Everyone!

    I am new to this forum and Kaseya and was hoping to find some information here that would get me started on a project I am working on. I am needing to uninstall Microsoft Essentials from multiple systems and then install the Kaspersky Anti-Virus in Kaseya. This is what I tired to use to uninstall Microsoft Essentials...

    1-      Under the audit module, go to Machine Summary.

    2-      Select the system where the software to be uninstalled resides

    3-      Go to the Software/Add/remove  tabs

    4-      Copy the GUID or uninstaller path of the program to be uninstalled

    5-      Create a new Agent procedure

    6-      Select the Uninstall by Product GUID

    7-      Paste the key you copied in step 4 in the MSI GUID to uninstall field

    8-      Select how to uninstall the program

    9-      Save and execute the procedure on the target systems 

    (note the GUID for a specific software program is the same on all PCs as long as the version is identical)

    Unfortunately I ran this and it did not uninstall Microsoft Security Essentials as I had hoped.

    Is there a scripting section in Kaseya that I can use? Where can I find it?

  • Hi.

    Did you paste the entire GUID - MSI ............. It will not work. You just need to paste the string withing brackets (brackets not included).

  • This is what I pasted in the Procedure

    "C:\Program Files\Microsoft Security Client\Setup.exe" /x

  • Procedure Security Essential Uninstall.xml

    You can use the attached Agent Procedure. 

  • You need to use the executeShellCommand statement here .

  • Here is a screen capture of my procedure, hopefully you can read it...

  • "C:\Program Files\Microsoft Security Client\Setup.exe" /x /s

  • I have attached the Agent Procedure in my previous comment. It works.

  • Overall What they are telling you is that you cannot use "UNinstall by GUID" when you are specifying a full commandline to execute the uninstall.

    Uninstall by Product GUID is expecting something that has specifically been installed by the microsoft Installer service and it will actually needs nothing more than the "GUID" (globally unique identifier) of the product to complete the uninstall.

    These programs would actually have the Uninstall string listed as "MSIExec.exe /X {SOme long random Guid here}  as the uninstall string...

    For example:

    Java(TM) 7 Update 5                           MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217005FF}

    SO in that case the GUID would be 26A24AE4-039D-4CA4-87B4-2F83217005FF.

    In order to uninstall programs that list something *other* than msiexec.exe .... as the uninstall string, as the others referenced here are indicating, rather than use the agent procedure option to Uninstall by Product GUID, you would instead use Execute Shell Command with your uninstall string.

  • Is it possible to use the the uninstall string and still do it in the background and unattended?

  • If you can successfully use the uninstall string (not the GUID, but the setup.exe /whatever /whatever) in the local command window, then you should be able to uninstall using a script.  However, to do this you MUST use the executeShellCommand step and NOT the uninstallbyProductGUID step.