Inzuscene Device Setup Tool
Automated Windows device provisioning with Microsoft 365 SSO, Bitdefender installation, screen recording, and compliance reporting.
Built with Tauri v2 (Rust backend) + Next.js 14 (static-exported frontend).
What It Does
When a user launches the EXE on a new/re-imaged Windows device:
Authenticates via Microsoft 365 SSO (Azure AD)
Records the full screen + system audio (FFmpeg)
Renames the computer to INZ<First4><Last2>WS format (e.g., INZJOHNSMWS)
Installs Bitdefender security suite (silent mode)
Uploads the recording to the user's OneDrive (/Recordings/<DeviceName>.mp4)
Sends a completion email to itadmin@inzuscene.com via SMTP
Locks the user from re-running (one-time execution)
Self-deletes the EXE and restarts the machine
All with a professional step-by-step UI.
Architecture
┌─────────────────────────────────────────────────────┐
│ Tauri v2 Application │
│ │
│ Next.js Frontend (WebView2) Rust Backend │
│ ├── LoginScreen ├── auth.rs │
│ ├── ProgressDashboard ├── recorder.rs │
│ ├── CompletionScreen ├── system.rs │
│ ├── LockedScreen ├── email.rs │
│ └── ErrorScreen ├── onedrive.rs │
│ ├── lockfile.rs │
│ @azure/msal-browser └── state.rs │
│ @tauri-apps/api │
└─────────────────────────────────────────────────────┘
Prerequisites
Development
Tool Version Purpose Node.js 20 LTS Next.js build Rust 1.75+ Tauri backend compilation Tauri CLI 2.x cargo tauri dev/buildFFmpeg 6.x+ Screen recording (bundled) VS Build Tools 2022 Latest Windows MSVC compilation
Azure AD Setup
Register an app in Azure Portal → App registrations
Configure:
Redirect URI : http://localhost (Mobile/Desktop platform)
Allow public client flows : YES
API Permissions (Delegated):
User.Read — Read profile
Files.ReadWrite — OneDrive upload
offline_access — Refresh tokens
Grant admin consent
Copy Client ID and Tenant ID into src/lib/msal-config.ts
SMTP Configuration
Edit src-tauri/src/email.rs — replace the placeholder SMTP credentials:
1 const SMTP_HOST : & str = "mail.inzuscene.com" ;
2 const SMTP_PORT : u16 = 587 ;
3 const SMTP_USERNAME : & str = "setup-bot@inzuscene.com" ;
4 const SMTP_PASSWORD : & str = "YOUR_ACTUAL_PASSWORD" ; // ← Replace
Quick Start
1 # Clone the project
2 cd inzuscene-setup
3
4 # Install Node.js dependencies
5 npm install
6
7 # Development mode (hot-reload)
8 npm run tauri dev
9
10 # Production build
11 npm run tauri build
The production build outputs to:
src-tauri/target/release/bundle/
├── nsis/Inzuscene Device Setup_1.0.0_x64-setup.exe
└── msi/Inzuscene Device Setup_1.0.0_x64_en-US.msi
Project Structure
inzuscene-setup/
├── src/ # Next.js frontend
│ ├── app/
│ │ ├── layout.tsx # Root layout
│ │ ├── page.tsx # Main app (screen router)
│ │ └── globals.css # Tailwind + custom styles
│ ├── components/
│ │ ├── LoginScreen.tsx # Microsoft SSO login
│ │ ├── ProgressDashboard.tsx # Step-by-step progress
│ │ ├── StepCard.tsx # Individual step card
│ │ ├── CompletionScreen.tsx # Success + restart countdown
│ │ ├── LockedScreen.tsx # Already-completed + override
│ │ └── ErrorScreen.tsx # Error display
│ ├── hooks/
│ │ ├── useMsal.ts # MSAL auth hook
│ │ └── useTauriInvoke.ts # Safe Tauri IPC wrapper
│ ├── lib/
│ │ ├── msal-config.ts # Azure AD configuration
│ │ └── device-name.ts # Naming convention logic
│ └── types/index.ts # Shared types
│
├── src-tauri/ # Rust backend
│ ├── src/
│ │ ├── lib.rs # App builder + command registration
│ │ ├── main.rs # Entry point
│ │ ├── auth.rs # Graph API user profile
│ │ ├── recorder.rs # FFmpeg screen recording
│ │ ├── system.rs # Rename, install, restart, self-delete
│ │ ├── email.rs # SMTP (lettre) with hardcoded creds
│ │ ├── onedrive.rs # Graph API chunked upload
│ │ ├── lockfile.rs # Registry lock + HMAC override
│ │ ├── state.rs # Shared app state
│ │ └── bin/admin_tool.rs # Admin CLI for overrides
│ ├── binaries/ # Bundled FFmpeg sidecar
│ ├── capabilities/default.json # Tauri v2 ACL
│ ├── Cargo.toml # Rust dependencies
│ ├── tauri.conf.json # Tauri config
│ └── app.manifest # UAC elevation manifest
│
├── package.json
├── next.config.js
├── tailwind.config.ts
└── tsconfig.json
Device Naming Convention
Format: INZ<First4><Last2>WS — ALL CAPS
User Name Device Name Notes John Smith INZJOHNSMWS Standard case Jane Doe INZJANEDOWS Standard case Ali Khan INZALIXKHWS "ALI" padded to "ALIX" Ed Li INZEDXXLIWS "ED" padded to "EDXX"
Names are taken from the user's Microsoft 365 account (givenName + surname).
Admin Override System
When a user's setup is locked (already completed), they see a "Setup Already Completed" screen with two options:
Option 1: Override Code (Recommended)
IT admin generates a code using the admin tool:
1 # Build the admin tool
2 cargo build --bin admin_tool --release
3
4 # Generate an override code
5 ./admin_tool --generate-code john.smith@inzuscene.com
6 # Output: Code: A1B2C3D4E5F6G7H8
7
8 # User enters this code in the locked screen
Option 2: Direct Registry Override
1 :: Run as Administrator on the target machine
2 inz-admin.exe --set-override john.smith@inzuscene.com
Option 3: Request via Email
User clicks "Request re-installation from IT Admin" → automated email sent to itadmin@inzuscene.com.
FFmpeg Setup
The app expects FFmpeg to be available. Options:
Bundle as Sidecar (Recommended)
Download FFmpeg for Windows: https://www.gyan.dev/ffmpeg/builds/
Place ffmpeg.exe at: src-tauri/binaries/ffmpeg-x86_64-pc-windows-msvc.exe
The Tauri build automatically includes it
System PATH
If FFmpeg is installed system-wide and on PATH, it works without bundling.
Code Signing
For production deployment, sign the EXE:
1 // In tauri.conf.json → bundle → windows:
2 {
3 "certificateThumbprint" : "YOUR_CERT_THUMBPRINT" ,
4 "digestAlgorithm" : "sha256" ,
5 "timestampUrl" : "http://timestamp.digicert.com"
6 }
Security Notes
SMTP credentials are compiled into the binary. The SMTP account should have minimal permissions (send-only to itadmin@inzuscene.com).
Access tokens are held in memory only, never written to disk.
Execution lock uses hashed email in HKLM registry (requires admin to modify).
Override codes use HMAC-SHA256 with a shared secret.
The app requires Administrator privileges (UAC manifest).
Troubleshooting
Issue Solution "No audio device found" Enable "Stereo Mix" in Windows Sound → Recording devices "Installer not found" Place Bitdefender installer at C:\Setup\BitdefenderSetup.exe Auth popup blocked Allow popups in WebView security settings SMTP send fails Verify SMTP host, port, and credentials in email.rs Rename fails Ensure running as Administrator FFmpeg not found Bundle FFmpeg or install to system PATH
License
Proprietary — Inzuscene Internal Use Only.
© 2025 Inzuscene. All rights reserved.