The ConnectWise Control forum has moved to ConnectWise University! This forum has been locked and is in read-only mode. Click here for instructions on how to access the new forum.

Welcome Guest! You can not login or register.



Go to last post Go to first unread
#1 Posted : Tuesday, February 5, 2019 12:08:09 PM(UTC)

Rank: Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 2/11/2014(UTC)
Posts: 21

Was thanked: 1 time(s) in 1 post(s)
Hey guys,

I am expecting the answer is to create an Extension, so will ask re this.

We have ScreenConnect installed and deployed to a number of devices. Of those devices, there is a selection with an application running that we want to know if the process is running.
Deploying a full monitoring solution is an option we are considering, but if I can use SC to do this its much easier and a simpler installation process.

Right now we query SC via the API of RMM+ to see which computers are online and offline. And want to add a method for monitoring just this single process, if the application is installed.

Is an extension the only way to go? Or is it possible from the client to have it update say a Custom Property from the client itself?


#2 Posted : Wednesday, February 6, 2019 12:41:08 AM(UTC)

Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 2/6/2014(UTC)
Posts: 316
United States

Thanks: 6 times
Was thanked: 33 time(s) in 29 post(s)
I trigger setting changes on CustomProperty values from client devices all the time. If you can trigger a web request in any fashion at all (Curl, powershell, wget, .net webrequest, an so on). Yes, it requires an extension to handle the input, but it's a pretty simple mechanism.

Here's a stripped down Handler.ashx that provides the base functionality for you to update CustomProperty6 with a web request.


<%@ WebHandler Language="C#" Class="Handler" Debug="true" %>

using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Xml.Linq;
using ScreenConnect;

public class Handler : IHttpHandler
	public void ProcessRequest(HttpContext context)
		String sSession = context.Request.QueryString["s"];
		String sData    = context.Request.QueryString["d"];
		// this represents a zero-based array so 5 = CustomProperty6
		int iField      = 5;
		// trigger with: "https://example.com/App_Extensions/<ext-guid>/Handler.ashx/?s=<device-guid>&d=<value>"
		Guid sessionID = Guid.Parse(sSession);
		Session session = SessionManagerPool.Demux.GetSession(sessionID);
		context.Response.ContentType = "text/plain";
		// full - replace the value for the entire software field
		session.CustomPropertyValues[iField] = sData;
		SessionManagerPool.Demux.UpdateSession("Software Inventory", sessionID, session.Name, session.IsPublic, session.Code, session.CustomPropertyValues);
	public bool IsReusable
		get { return false; }

Replace "<ext-guid>" with the GUID folder name you store Handler.ashx in. Replace "<device-guid>" with the GUID for the specific device (you can get this from the registry). Replace "<value>" with the specific value you want to store. If you want to be able to use the search function to quick filter, I suggest something like "svc:on" or something else that's unlikely to appear in the commands, messages, notes or other custom properties. You can also use session groups to organize the devices, too.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.