Kaseya Community

Use built-in scripts, like "WinVNC4 Uninstall"

  • There are tons of scripts that Kaseya runs on agents when you select options in the web gui. Unfortunately, I have no found a way to access them and use them on command. For example, We want to uninstall WinVNC4 for all Agents. The script already exists somewhere in Kaseya, questions is how do I use it? It shows in the script logs after manually clicking the button to uninstall it.

    WinVNC4 Uninstall 2:31:18 pm 4-Sep-09 Success THEN

    Any ideas?

    Legacy Forum Name: Use built-in scripts, like "WinVNC4 Uninstall",
    Legacy Posted By Username: boostmr2
  • Amazingly as soon as I posted, I created a test script and selected "Execute Script" as my first step. In the drop down for "Select Script" is a folder called "System" that does not show in my Script view in the Scripts tab. Some scripts, such as WinVNC4 Uninstall are here!

    I also found a "search for script" I will be utilizing to find more scripts. I wonder if ANY script that shows in the agent scriptlog can be had this way. This is very powerful!

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: boostmr2
  • I was thinking the same thing, but for the latest audit, if I search for a scrip ti can see it, but when I want to execute it, its not there,

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: thirteentwenty
  • If I do a search for a script, it shows some with a blue hyperlink, and a message at the top states "Click the scriptname to select". When you click the script, the window closes, and nothing else visible occurs. I'm lost....

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: boostmr2
  • Screenshot.jpg
    You can open the scripts after they have executed, and utilise them if required by "exporting" them to a user script (create a new id for the script).



    Using IE, in the "pending scripts" section, locate the area just after (using your example) "WinVNC4 Uninstall" where the mouse point changes. Hold down the left Alt button, and click on this location. It will open the script that was executed. Simply export this script.



    I have attached a screen shot of this clicky thing.





    eg:



    Script Name: WinVNC4 Uninstall

    Script Description: This script removes the copy of WinVNC4 that was installed automatically by the system.



    IF Check Registry Value

    Parameter 1 : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RealVNC_is1\Inno Setup: App Path

    Exists :

    THEN

    Get Variable

    Parameter 1 : 2

    Parameter 2 : c:\Program Files\RealVNC\VNC4

    Parameter 3 : vnc4Dir

    OS Type : 0

    Get Variable - (Continue on Fail)

    Parameter 1 : 0

    Parameter 2 : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RealVNC_is1\Inno Setup: App Path

    Parameter 3 : vnc4Dir

    OS Type : 0

    Execute File - (Continue on Fail)

    Parameter 1 : #vnc4Dir#\WinVNC4.exe

    Parameter 2 : -stop

    Parameter 3 : 2

    OS Type : 0

    Execute File - (Continue on Fail)

    Parameter 1 : #vnc4Dir#\WinVNC4.exe

    Parameter 2 : -unregister

    Parameter 3 : 2

    OS Type : 0

    Pause Script

    Parameter 1 : 10

    OS Type : 0

    Delete Registry Key - (Continue on Fail)

    Parameter 1 : HKEY_LOCAL_MACHINE\SOFTWARE\RealVNC

    OS Type : 0

    Delete Registry Key - (Continue on Fail)

    Parameter 1 : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RealVNC_is1

    OS Type : 0

    Delete File - (Continue on Fail)

    Parameter 1 : #vnc4Dir#\logmessages.dll

    OS Type : 0

    Delete File - (Continue on Fail)

    Parameter 1 : #vnc4Dir#\wm_hooks.dll

    OS Type : 0

    Delete File - (Continue on Fail)

    Parameter 1 : #vnc4Dir#\vncconfig.exe

    OS Type : 0

    Delete File - (Continue on Fail)

    Parameter 1 : #vnc4Dir#\WinVNC4.exe

    OS Type : 0

    ELSE



    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: mparr