Handling First-Launch Overwrites

Many Windows applications create default configuration files and registry entries the first time they start. If user-level settings are imported before the application has run for the first time, the first-launch routine overwrites the restored data with defaults. This is the most common cause of failed restores.


Why This Happens

When a user logs into a new or reset profile, the following sequence occurs:

  1. Windows creates the user profile folder structure.
  2. Logon scripts, startup items, and scheduled tasks begin running.
  3. Applications launch (either automatically via startup entries or when the user opens them).
  4. Each application checks for its configuration. Finding none, it runs a first-launch wizard or creates default files.

If AppProfileSafe imports user settings during step 2 (before applications run), the restored files are in place when the application starts in step 3. However, many applications do not check whether the files already exist — they unconditionally overwrite or regenerate them.

Applications with Aggressive First-Launch Behavior

ApplicationFirst-Launch BehaviorRecommended Approach
Microsoft OutlookCreates a new mail profile under HKCU\Software\Microsoft\Office\...\Outlook\Profiles. Launches the account setup wizard.Import after Outlook has been opened and closed at least once. Alternatively, pre-import the Outlook profile registry keys — this can skip the first-launch wizard entirely if the mail server configuration is already present.
Mozilla FirefoxCreates a new profile folder under %APPDATA%\Mozilla\Firefox\Profiles with a random name. Writes profiles.ini.Import after Firefox has been opened once. The import overwrites the newly created default profile folder contents. Firefox picks up the restored data on next launch.
Google ChromeCreates the Default profile in %LOCALAPPDATA%\Google\Chrome\User Data. Writes Preferences, Bookmarks, etc.Import after Chrome has initialized once. Chrome handles missing or replaced files gracefully and regenerates any structural files it needs.
Microsoft TeamsDownloads and caches user data on first sign-in. Creates %APPDATA%\Microsoft\Teams with configuration and cache files.Import Teams settings only after the initial sign-in and cache population completes. Teams regenerates cache files but preserves imported configuration.
Microsoft Office (general)Runs Office First Run Experience (FRE). Sets up licensing, telemetry, and default settings in the registry.Let Office complete its FRE before importing. The import overwrites FRE-generated defaults with the backed-up settings.
Adobe Acrobat ReaderCreates registry keys under HKCU on first launch. Writes default preferences.Import after first launch. Low risk — Acrobat Reader's first-launch is non-destructive to most settings.

The General Rule

Let the user log in, wait for all applications to start at least once, then run the import. A delay of 2–3 minutes after logon is usually sufficient for most environments. The import then overwrites the freshly created defaults with the backed-up settings. Applications pick up the restored configuration on their next launch.

Implementation

Add a timeout before the CLI import command:

:: Wait 2 minutes for first-launch routines
timeout /t 120 /nobreak > nul

:: Then import
AppProfileSafe.CLI.exe --import ^
  --manifestFile "\\server\backups\%COMPUTERNAME%\%USERNAME%\Manifest.xml" ^
  --apps "Firefox-User,Office-User,Chrome-User" ^
  --unc-credential-store --silentMode --ignoreRestorePointLimit

For a more robust approach, see the marker file pattern in Deployment Methods for User Import.

Application-Aware Phased Import

For environments with particularly sensitive applications, split the import into phases:

PhaseAppsWhen
1 — ImmediateLine-of-business apps, custom tools (no first-launch conflict)At logon, no delay needed
2 — After initializationFirefox, Chrome, Acrobat (simple first-launch)After 2 minutes
3 — After user interactionOutlook, Teams (account setup required)After user has signed in and closed the app once

Phase 3 is best handled as a self-service step — the user runs a batch file after completing their initial Outlook/Teams setup.

What About the Machine Import?

Machine-level settings (HKLM, ProgramData) are typically not affected by first-launch overwrites. First-launch routines operate in the user's context and write to HKCU and user profile folders. The machine import can safely run before the first user logon.

See Also