Skip to content

Disable update prompts when installed from Microsoft Store#159

Open
Slashxdd wants to merge 1 commit intoModuleArt:feature/new-webp-decoderfrom
Slashxdd:fix/skip-updates-for-store-install
Open

Disable update prompts when installed from Microsoft Store#159
Slashxdd wants to merge 1 commit intoModuleArt:feature/new-webp-decoderfrom
Slashxdd:fix/skip-updates-for-store-install

Conversation

@Slashxdd
Copy link
Copy Markdown

Fixes #127

Problem

Users who install via the Microsoft Store are prompted on every launch to update to a GitHub release that isn't published on the Store. The Store manages its own update lifecycle, so these prompts are incorrect and confusing.

Detection

Uses GetCurrentPackageFullName from kernel32.dll — the standard Windows API for detecting packaged (Store) apps. Returns APPMODEL_ERROR_NO_PACKAGE (15700) for non-packaged installs. This is the same approach used by major apps (e.g. VS Code, Spotify) to distinguish Store from direct installs.

[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
private static extern int GetCurrentPackageFullName(ref int packageFullNameLength, IntPtr packageFullName);

internal static bool IsInstalledFromStore()
{
    int length = 0;
    return GetCurrentPackageFullName(ref length, IntPtr.Zero) != 15700;
}

Changes

File Change
MainForm.cs Added IsInstalledFromStore() helper; skip startup CheckForUpdates call for Store installs
AboutForm.cs Hide "Check for app updates" button for Store installs
SettingsForm.cs Hide "Check for app updates" checkbox for Store installs

For non-Store installs, behaviour is completely unchanged.

Resolves ModuleArt#127: Store users were prompted to update to a GitHub release
that isn't available on the Store, causing confusion on every launch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant