Kaseya Community

hide kaseya agent in add/remove programs

  • I thought at one time that there was a script to hide the kaseya agent in the add/remove programs list.  It might have been part of the agent rebranding.

    I did not see it listed.  Can someone help me?

     

  • ok I found this.  How about for the services also?

    I use a procedure to check for the registry key and - if it exists - set the "SystemComponent" to "1".

    So, for 32-bit I test the existence of the following Registry Key:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\<companyIDHash>

    and if it exists I create

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\<companyIDHash>\SystemComponent and set the Reg_DWORD to 1.

    Now, this simply hides the agent entry from appearing in the "Add | Remove Programs" or "Programs and Features".  It does not specifically hide the items that the original poster is requesting....

    Naturally, for 64-bit the Registry Key to be tested would be similar:  HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Microsoft\Windows\CurrentVersion\Uninstall\<companyIDHash>

  • Hope this helps

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\KA~ your Kaseya ID\DisplayName   - Your Service Name

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\KAS ~ your kaseya id \DisplayName  - Your Service Name 

    delete      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\KAS ~ your kasyea id

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\ YOUR new Name for SERVICE   < should hold location of kausrtsk.exe 

     

     

     

  • Did you get this to work correctly?  I can't get it to work.  I created a new procedure and used these values:

    Check Registry Value

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\<companyIDHash>

    Exists

    Set Registry Value

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\<companyIDHash>\SystemComponent

    Enter the data type:

    1

    Select the data type:

    REG_DWORD

    Perform Step On:

    All Operating systems

    When I run the script it says it completes successfully, but it doesn't change the registry.  I can manually add the registry entry and it takes effect immediately without a reboot, so I know the registry entry is correct.

  • Procedure_Hide_Kaseya_Agent_AddRemove.zip

    I normally just delete the "DisplayName" Data Value but adding the "SystemComponent" Data Value with the value of 1 works too. I have attached a zipped export of the script to this post too if you are having trouble with the code below.


    <?xml version="1.0" encoding="utf-8"?>
    <ScriptExport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.kaseya.com/vsa/2008/12/Scripting">
      <Procedure name="Hide Kaseya Agent AddRemove" treePres="3" id="1247354130">
        <Body description="">
          <Statement description="" name="GetVariable" continueOnFail="false" osType="NT4|2000|XP|2003|Vista|2008">
            <Parameter xsi:type="EnumParameter" name="VariableType" value="ConstantValue" />
            <Parameter xsi:type="StringParameter" name="SourceContent" value="(Insert Kaseya Company ID here!)" />
            <Parameter xsi:type="StringParameter" name="VariableName" value="KaseyaID" />
          </Statement>
          <Statement description="" name="GetVariable" continueOnFail="false" osType="NT4|2000|XP|2003|Vista|2008">
            <Parameter xsi:type="EnumParameter" name="VariableType" value="ConstantValue" />
            <Parameter xsi:type="StringParameter" name="SourceContent" value="Microsoft\Windows\CurrentVersion\Uninstall\#KaseyaID#" />
            <Parameter xsi:type="StringParameter" name="VariableName" value="REGKEY" />
          </Statement>
          <If description="">
            <Condition name="Windows 32 or 64 Bit Check">
              <Parameter xsi:type="EnumParameter" name="Condition" value="NotExists" />
              <Parameter xsi:type="StringParameter" name="Value" value="" />
            </Condition>
            <Then>
              <Statement description="Set the specified registry value - Regedit displays keys as folders and values as documents." name="SetRegistryValue" continueOnFail="false" osType="NT4|2000|XP|2003|Vista|2008">
                <Parameter xsi:type="StringParameter" name="RegistryPath" value="HKEY_LOCAL_MACHINE\SOFTWARE\#REGKEY#\SystemComponent" />
                <Parameter xsi:type="StringParameter" name="Value" value="1" />
                <Parameter xsi:type="EnumParameter" name="DataType" value="Integer" />
              </Statement>
            </Then>
          </If>
          <If description="">
            <Condition name="Windows 32 or 64 Bit Check">
              <Parameter xsi:type="EnumParameter" name="Condition" value="Exists" />
              <Parameter xsi:type="StringParameter" name="Value" value="" />
            </Condition>
            <Then>
              <Statement description="Set the specified registry value on 64 bit systems." name="SetRegistryValue64" continueOnFail="false">
                <Parameter xsi:type="StringParameter" name="RegistryPath" value="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\#REGKEY#\SystemComponent" />
                <Parameter xsi:type="StringParameter" name="Value" value="1" />
                <Parameter xsi:type="EnumParameter" name="DataType" value="Integer" />
              </Statement>
            </Then>
          </If>
        </Body>
      </Procedure>
    </ScriptExport>

  • I got it to work.  I put in my Kaseya ID and I also changed a couple of the registry paths.

    Original:  HKEY_LOCAL_MACHINE\SOFTWARE\#REGKEY#\SystemComponent

    Modified: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\#RegKey#\SystemComponent

    and

    Original: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\#REGKEY#\SystemComponent

    Modified: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\#RegKey#\SystemComponent

    Thanks!!

  • lol, if you were talking about the script that I posted all you had to do is add your Kaseya Company ID to the #KaseyaID# var right at the top of the script. Anyways I suppose I should have explained how it works, at least you got it to work.

  • I thought I tried that and it wouldn't work.  When I changed the registry paths it seemed to work.  This is my first crack at scripting.  I'm a little green!   Is there a way to automatically push out this script when the agent installs itself?  I have this one user who is uninstalling the agent every time he logs in and I can't get to it fast enough to push this script before he removes it.  If I can push it out when the agent installs on login that would alleviate the issue.  Yes it's an HR issue, but until it can be dealt with, I need to have an agent on this computer.

  • During the creation of the installer that you are using on this machine you will have selected a template to base the installation package on.  Simply attach the script onto this installer and it should run it before the user has time to uninstall.  You can also add a /j to the installer which will remove the entry from the Start Menu, this combined with blocking access to the Add/Remove programs negates the need for this script I suppose.

  • @ HardKnox  -

    I too want to prevent the end user from using add/remove programs to uninstall Kaseya.  I saw a script that is supposed to do that, but it also removes the kaseya icon, which I want to leave.  The icon for us is a great tool when asking the end user what machine they are on. (hover)  Does your script remove the Kaseya icon?  Also, is the Kaseyaid you mention, my Kaseya serial number?

    Thanks for posting

  • @Jack;

    Nope the posted example only modifies the Uninstall Registry Value and does not remove any files.

    The KaseyaID I was referring to is the same as the Kaseya Agent's Service name and it starts with KA. If you open services.msc and you open the Kaseya agent service it will be displayed in the very first tab at the top under "Service name:". The Kaseya serial number starts the same but then has different numbers separated by dashes. If you go into the registry under;

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\

    You will see a registry key that start with KA######.... this is the same as your Kaseya Agent Service name.

  • @HardKnox

    It's exactly what I was looking for.  Your directions were excellent, and I really appreciate your assistance.

  • Is it possible to attach script to rebrand KAV at install the same way you can for the Kaseya agent?