Add WinRM filter, VNC IP fallback, UDC/CLM process detection
displaypcs.asp: - Replace "All Time" filter with WinRM status filter - Options: All, Needs WinRM (Has Equipment), Has WinRM, No WinRM - Add VNC IP fallback when hostname unavailable displaypc.asp: - Add VNC IP fallback when hostname unavailable api.asp: - Add isactive field support for installedapps table - UDC/CLM process detection sets isactive=1 if running, 0 if not displaymachines.asp: - Fix to exclude PC machine types (machinetypeid >= 33) - PCs were incorrectly showing on equipment list Update-ShopfloorPCs-Remote.ps1: - Add UDC.exe and PPMon.exe (CLM) process detection - Set isactive flag based on running process - Add 10.134.* to TrustedHosts for IP fallback connections Update-PC-CompleteAsset.ps1: - Add UDC/CLM process detection for local execution - Set isactive flag on tracked applications 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
28
api.asp
28
api.asp
@@ -607,7 +607,7 @@ Sub UpdateInstalledApps()
|
||||
|
||||
' Insert new app mappings
|
||||
Dim appCount, i, appName, appVersion, appid, appversionid, cmdInsert, appidStr, insertSQL
|
||||
Dim debugLoopError, safeVer, verSQL, rsVer
|
||||
Dim debugLoopError, safeVer, verSQL, rsVer, isActiveStr, isActive
|
||||
debugLoopError = ""
|
||||
appCount = 0
|
||||
Err.Clear
|
||||
@@ -622,7 +622,12 @@ Sub UpdateInstalledApps()
|
||||
appVersion = Trim(GetJSONValue(appsArray(i), "version") & "")
|
||||
appName = Trim(GetJSONValue(appsArray(i), "appname") & "")
|
||||
|
||||
LogToFile "App " & i & ": appid=" & appid & ", appname='" & appName & "', version='" & appVersion & "'"
|
||||
' Get isactive status (for UDC/CLM process detection)
|
||||
isActive = 1 ' Default to active
|
||||
isActiveStr = Trim(GetJSONValue(appsArray(i), "isactive") & "")
|
||||
If isActiveStr <> "" And IsNumeric(isActiveStr) Then isActive = CLng(isActiveStr)
|
||||
|
||||
LogToFile "App " & i & ": appid=" & appid & ", appname='" & appName & "', version='" & appVersion & "', isactive=" & isActive
|
||||
|
||||
If appid > 0 Then
|
||||
appversionid = 0
|
||||
@@ -658,11 +663,11 @@ Sub UpdateInstalledApps()
|
||||
If rs.State = 1 Then rs.Close
|
||||
End If
|
||||
|
||||
' Insert app
|
||||
' Insert app with isactive status
|
||||
If appversionid > 0 Then
|
||||
insertSQL = "INSERT INTO installedapps (machineid, appid, appversionid) VALUES (" & CLng(machineid) & ", " & CLng(appid) & ", " & CLng(appversionid) & ")"
|
||||
insertSQL = "INSERT INTO installedapps (machineid, appid, appversionid, isactive) VALUES (" & CLng(machineid) & ", " & CLng(appid) & ", " & CLng(appversionid) & ", " & isActive & ")"
|
||||
Else
|
||||
insertSQL = "INSERT INTO installedapps (machineid, appid) VALUES (" & CLng(machineid) & ", " & CLng(appid) & ")"
|
||||
insertSQL = "INSERT INTO installedapps (machineid, appid, isactive) VALUES (" & CLng(machineid) & ", " & CLng(appid) & ", " & isActive & ")"
|
||||
End If
|
||||
objConn.Execute insertSQL
|
||||
|
||||
@@ -726,7 +731,7 @@ Function SaveInstalledApps(machineid, installedAppsJson)
|
||||
|
||||
' Insert new app mappings
|
||||
Dim appCount, i, appName, appVersion, appid, appversionid, appidStr, insertSQL
|
||||
Dim safeVer, verSQL, rsVer
|
||||
Dim safeVer, verSQL, rsVer, isActiveStr, isActive
|
||||
appCount = 0
|
||||
Err.Clear
|
||||
|
||||
@@ -740,6 +745,11 @@ Function SaveInstalledApps(machineid, installedAppsJson)
|
||||
appVersion = Trim(GetJSONValue(appsArray(i), "version") & "")
|
||||
appName = Trim(GetJSONValue(appsArray(i), "appname") & "")
|
||||
|
||||
' Get isactive status (for UDC/CLM process detection)
|
||||
isActive = 1 ' Default to active
|
||||
isActiveStr = Trim(GetJSONValue(appsArray(i), "isactive") & "")
|
||||
If isActiveStr <> "" And IsNumeric(isActiveStr) Then isActive = CLng(isActiveStr)
|
||||
|
||||
If appid > 0 Then
|
||||
appversionid = 0
|
||||
Err.Clear
|
||||
@@ -772,11 +782,11 @@ Function SaveInstalledApps(machineid, installedAppsJson)
|
||||
If rs.State = 1 Then rs.Close
|
||||
End If
|
||||
|
||||
' Insert app
|
||||
' Insert app with isactive status
|
||||
If appversionid > 0 Then
|
||||
insertSQL = "INSERT INTO installedapps (machineid, appid, appversionid) VALUES (" & CLng(machineid) & ", " & CLng(appid) & ", " & CLng(appversionid) & ")"
|
||||
insertSQL = "INSERT INTO installedapps (machineid, appid, appversionid, isactive) VALUES (" & CLng(machineid) & ", " & CLng(appid) & ", " & CLng(appversionid) & ", " & isActive & ")"
|
||||
Else
|
||||
insertSQL = "INSERT INTO installedapps (machineid, appid) VALUES (" & CLng(machineid) & ", " & CLng(appid) & ")"
|
||||
insertSQL = "INSERT INTO installedapps (machineid, appid, isactive) VALUES (" & CLng(machineid) & ", " & CLng(appid) & ", " & isActive & ")"
|
||||
End If
|
||||
objConn.Execute insertSQL
|
||||
|
||||
|
||||
Reference in New Issue
Block a user