GeistHaus
log in · sign up

Normalize Identifying Corporate Devices in Your Software

lgug2z.com

If you dual-license your software in such a way that it requires a paid license for commercial use, here are two code blobs for you. macOS pub fn mdm_enrollment() -> eyre::Result<(bool, Option<String>)> { let mut command = Command::new("/usr/bin/profiles"); command.args(["status", "-type", "enrollment"]); let stdout = command.output()?.stdout; let output = std::str::from_utf8(&stdout)?; if output.contains("MDM enrollment: No") { return Ok((false, None)); } let mut server = None; for line in output.lines() { if line.starts_with("MDM server") { server = Some(line.trim_start_matches("MDM server: ").to_string()) } } Ok((true, server)) } Windows pub fn mdm_enrollment() -> eyre::Result<(bool, Option<String>)> { let mut command = Command::new("dsregcmd"); command.args(["/status"]); …

3 pages link to this URL
Release v0.1.39 · LGUG2Z/komorebi

v0.1.39 (2025-12-09) - Rescue Complex Automatic Notes komorebi now identifies devices enrolled in mobile device management (MDM) and displays a splash to inform you how to apply your individual com...

1 inbound link object en repository:390873100
Scraps #8

No scraps since 2025-08-01 but hopefully I can start regaining some momentum

0 inbound links scrap en scrap indiewebinfosectech