Issues Fixed: 1. UpdateInstalledApps() was using wrong table name 'machineapplications' - Changed to correct table 'installedapps' 2. INSERT was missing 'isactive' column required by installedapps table 3. GetOrCreateApplication() was using wrong column names: - 'applicationid' → 'appid' (primary key) - 'applicationname' → 'appname' - Removed 'version' column (doesn't exist in applications table) - Now stores version info in 'appdescription' field How It Works Now: - PowerShell script collects installed apps from registry - Filters to tracked apps (UDC, PPDCS, Oracle, Tanium, eDNC, etc.) - Sends to api.asp with action=updateInstalledApps - API deletes old app mappings for PC: DELETE FROM installedapps - API creates/finds apps in 'applications' table - API inserts new mappings: INSERT INTO installedapps (machineid, appid, isactive) Tables Used: - applications (appid, appname, appdescription, isactive) - installedapps (machineid, appid, isactive) Impact: Application tracking now works correctly with Phase 2 schema 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
56 KiB
56 KiB