Skip to content

fix: write Windows config to ProgramData and reseed per-user trays - #619

Open
madhavilosetty-intel wants to merge 2 commits into
mainfrom
windows-installer
Open

fix: write Windows config to ProgramData and reseed per-user trays#619
madhavilosetty-intel wants to merge 2 commits into
mainfrom
windows-installer

Conversation

@madhavilosetty-intel

Copy link
Copy Markdown
Contributor

Write the machine config to %ProgramData% (the console's Windows machineConfigPath) so each user's tray seeds from it, clear stale per-user config on (re)install, and remove every profile's per-user data on uninstall.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Windows NSIS installer/uninstaller for the Console to seed configuration from a machine-wide location (%ProgramData%) so each user’s system tray can re-seed from a common config, and to more aggressively clear per-user state during reinstall/uninstall flows.

Changes:

  • Write the generated config.yml to %ProgramData%\device-management-toolkit\config.yml via SetShellVarContext all.
  • On install/reinstall, delete each profile’s per-user config.yml so trays will re-seed from the machine config.
  • On uninstall (when opting in), remove per-user data directories for every profile, and remove the machine-wide config seed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread installers/windows/console.nsi Outdated
Comment thread installers/windows/console.nsi Outdated
Comment thread installers/windows/console.nsi Outdated
Comment thread installers/windows/console.nsi Outdated
@madhavilosetty-intel
madhavilosetty-intel force-pushed the windows-installer branch 2 times, most recently from 77d3504 to c2c6ab6 Compare June 25, 2026 18:58
Write the machine config to %ProgramData% (the console's Windows
machineConfigPath) so each user's tray seeds from it, clear stale per-user
config on (re)install, and remove every profile's per-user data on uninstall.
@graikhel-intel

graikhel-intel commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

I've tested this on Windows 11, and everything looks good from my testing.

Here's what I verified:

  • Started with a clean system by ensuring all previous installation artifacts were removed (configuration, databases, logs, and any leftover data).
  • Performed a fresh install and verified that the application was configured correctly.
  • Confirmed the following locations:
    • Config and database: %APPDATA%\device-management-toolkit
    • Logs: %LOCALAPPDATA%\device-management-toolkit
    • Executable and uninstaller: C:\Program Files\device-management-toolkit\Console
  • Performed an uninstall and verified that all application files and data were cleaned up successfully.

A couple of items that might be worth considering for a future enhancement (perhaps Q3'26):

  • We intentionally place the TLS certificates in the temporary directory today since customers are expected to replace them with their own certificates. This might be a good opportunity to revisit whether they should instead live under the application config directory or another more appropriate location.

  • Is there a way to customize the installer icon as well as the application icon? It would help make the installer feel more polished.

  • With the upcoming "Windows Credential Manager" secure storage feature, we have an opportunity to have the installer store the configured credentials directly in the Credential Manager instead of the config.

Other than that, great job getting this done!

@sudhir-intc

sudhir-intc commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

@madhavilosetty-intel : I have you tried your PR by building the installer locally as well as through the https://github.com/device-management-toolkit/deployment/actions/workflows/installer-windows.yml workflow. In both the installers, after installation I am seeing that when I click the "DMT Console.lnk" the "command window" does not get launched and it closes of immediately. Could you please check

I see this error "2026/07/10 16:01:21 Config error: mkdir C:\Program Files\Device Management Toolkit\Console\config: Access is denied.
C:\Program Files\Device Management Toolkit\Console>"

@sudhir-intc sudhir-intc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though not related to this PR, but there are issues in the deployment repo which needs to be fixed before any installed related merges are done:

The console sub-module and sample-ui sub-module in deployment repo does not point a commit from the main of the console and sample-ui repo, instead it point a branch created by mike
console: GitHub - device-management-toolkit/console at 9827f1807d419de476e26156408f337dd3846986 .
sample-ui: ci: ensures UI is present for building by rsdmike · Pull Request #593 · device-management-toolkit/de…
I do see following key issues in the branch which was committed through the PR# ci: ensures UI is present for building by rsdmike · Pull Request #593 · device-management-toolkit/de…

  1. There's a docs folder for the design in this repo, this is against the guideline which Mike had mentioned to not have design docs in the code repos.
  2. There are partial code changes related to the feature "Make rpc-go and config Downloadable from Console UI"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants