Kaseya Community

K2 Scripts that wont work now because of unique Agent directory

  • Is there a work around for this? Now since the K2 uses unique agent directory under Program Files instead of the standard "Agent".


    We're trying to make it so that when we run the script for the Reboot into Safe mode with Networking. Which we got that far, but the Kaseya Service didnt start, so luckily we were in test environment and wasnt impacted but we werent able to do anything after that.

    Looks like we can add a registry key to add that service into safe mode startup. But of course the .exe file is behind that Unique Directory in Program Files.

    Theres been a few scripts, even kaseya optimization scripts that we cant use anymore because of this.

    I dont know squat about scripting but is it possible to like run a command to pull that ID first then automatically input that into the script where it needs the ID?

  • I am actually going to look into this tomorrow - so if no one has a fix by then - ill post my results...

  • Real quick

    I am re writing mine - to include 64bit and all that fun stuff..  

    The registry key to find that unique directory is "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AgentMon.Exe\Path"

    that should get you the path you need for your script..   Just load it into a variable...