Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions schemas/JSON/manifests/latest/manifest.installer.latest.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"type": [ "string", "null" ],
"minLength": 1,
"maxLength": 512,
"description": "Silent is the value that should be passed to the installer when user chooses a silent or quiet install"
"description": "Silent is the value that should be passed to the installer when user chooses a silent install"
},
"SilentWithProgress": {
"type": [ "string", "null" ],
Expand Down Expand Up @@ -313,6 +313,7 @@
},
"maxItems": 16,
"uniqueItems": true,
"examples": ["DirectPlay", "Microsoft-Windows-Subsystem-Linux"],
"description": "List of Windows feature dependencies"
},
"WindowsLibraries": {
Expand Down Expand Up @@ -367,7 +368,17 @@
"type": [ "string", "null" ],
"minLength": 1,
"maxLength": 255,
"description": "ProductCode could be used for correlation of packages across sources"
"examples": ["{MSI-GUID}", "ContosoApp"],
"description": "The name of the ARP registry key, could be used for correlation of packages across sources"
},
"UpgradeCode": {
"type": [ "string", "null" ],
"pattern": "^{[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}}$",
Comment thread
denelon marked this conversation as resolved.
"minLength": 38,
"maxLength": 38,
"examples": ["{MSI-GUID}"],
"description": "Represents a related set of products, could be used for correlation of packages across sources",
"$comment": "https://learn.microsoft.com/en-us/windows/win32/msi/using-an-upgradecode"
},
"Capabilities": {
"type": [ "array", "null" ],
Expand All @@ -378,6 +389,7 @@
},
"maxItems": 1000,
"uniqueItems": true,
"examples": ["contacts", "internetClient", "globalMediaControl"],
"description": "List of appx or msix installer capabilities"
},
"RestrictedCapabilities": {
Expand All @@ -389,6 +401,7 @@
},
"maxItems": 1000,
"uniqueItems": true,
"examples": ["deviceUnlock", "runFullTrust", "broadFileSystemAccess"],
"description": "List of appx or msix installer restricted capabilities"
},
"Market": {
Expand Down Expand Up @@ -501,7 +514,7 @@
"$ref": "#/definitions/ProductCode"
},
"UpgradeCode": {
"$ref": "#/definitions/ProductCode"
"$ref": "#/definitions/UpgradeCode"
},
"InstallerType": {
"$ref": "#/definitions/InstallerType"
Expand Down Expand Up @@ -533,8 +546,10 @@
"properties": {
"DefaultInstallLocation": {
"type": [ "string", "null" ],
"minLength": 1,
"minLength": 2,
"maxLength": 2048,
"pattern": "^[%\\]",

@pl4nty pl4nty Jun 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A lot of apps hardcode a C:\ prefix. Most of these are parsed directly from the installer by komac

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

But it does not make sense to allow that. I don't think this value is actually used yet but when it is, there are pretty much only 3 places that make sense:

  • %ProgramFiles%\MyApp (Or in %ProgramFiles(x86)%)
  • %LocalAppData%\Programs\MyApp
  • \MyApp (In the root of any drive? The same drive as %windir%?)

@pl4nty pl4nty Jun 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unfortunately a lot of apps do not install to paths that make sense. I don't think we can block apps from WinGet just because they install to an unusual path

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's not about blocking anyone but manifests should match the spec. Some manifests might need to change c:\MyApp to \MyApp etc. to be compliant if they want to update to the latest manifest version.

@pl4nty pl4nty Jul 1, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think that could be misleading though. These apps don't install to \MyApp or %SystemDrive%\MyApp, they specifically hardcode C:\MyApp

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.

The fact that "some manifests may need to change" would indicate to me this is a breaking change as manifest versions should be forward compatible as mich as possible.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think that could be misleading though. These apps don't install to \MyApp or %SystemDrive%\MyApp, they specifically hardcode C:\MyApp

C:\ might not even exist on all systems.

Somebody from Microsoft should chime in and say the exact allowed format of this value (which is the point of this PR in the first place).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we have any concrete examples of packages in the repository that exhibit this behavior. I suspect we'll need to use a few real examples to make the right decision here.

@sredna sredna Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Do we have any concrete examples of packages in the repository that exhibit this behavior.

Examples of drive c: root folders (I think this is all the packages that do this):

Examples of broken entries:

  • Ethereum.geth.installer.yaml: InstallDir (This looks like a bug in some sort of automated script. In NSIS installers, the default install directory is specified like InstallDir "$ProgramFiles\MyApp")
  • Humanity.DJV2.installer.yaml: Documents\DJV 3.3.4 (I assume they mean My Documents but that should be specified as %userprofile%\Documents)
  • GAM-Team.gam.installer.yaml used to specify ./GAM7 (relative to what?) in older versions but has been corrected to %SystemDrive%\GAM7 in newer versions so this is no longer a problem nor a breaking change.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@JohnMcPMS what are your thoughts here?

"examples": ["%ProgramFiles%\\ContosoApp"],
"description": "Represents the default installed package location. Used for deeper installation detection."
},
"Files": {
Expand Down
23 changes: 19 additions & 4 deletions schemas/JSON/manifests/latest/manifest.singleton.latest.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
"type": [ "string", "null" ],
"minLength": 1,
"maxLength": 512,
"description": "Silent is the value that should be passed to the installer when user chooses a silent or quiet install"
"description": "Silent is the value that should be passed to the installer when user chooses a silent install"
},
"SilentWithProgress": {
"type": [ "string", "null" ],
Expand Down Expand Up @@ -415,6 +415,7 @@
},
"maxItems": 16,
"uniqueItems": true,
"examples": ["DirectPlay", "Microsoft-Windows-Subsystem-Linux"],
"description": "List of Windows feature dependencies"
},
"WindowsLibraries": {
Expand Down Expand Up @@ -468,7 +469,17 @@
"type": [ "string", "null" ],
"minLength": 1,
"maxLength": 255,
"description": "ProductCode could be used for correlation of packages across sources"
"examples": ["{MSI-GUID}", "ContosoApp"],
"description": "The name of the ARP registry key, could be used for correlation of packages across sources"
},
"UpgradeCode": {
"type": [ "string", "null" ],
"pattern": "^{[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}}$",
"minLength": 38,
"maxLength": 38,
"examples": ["{MSI-GUID}"],
"description": "Represents a related set of products, could be used for correlation of packages across sources",
"$comment": "https://learn.microsoft.com/en-us/windows/win32/msi/using-an-upgradecode"
},
"Capabilities": {
"type": [ "array", "null" ],
Expand All @@ -479,6 +490,7 @@
},
"maxItems": 1000,
"uniqueItems": true,
"examples": ["contacts", "internetClient", "globalMediaControl"],
"description": "List of appx or msix installer capabilities"
},
"RestrictedCapabilities": {
Expand All @@ -490,6 +502,7 @@
},
"maxItems": 1000,
"uniqueItems": true,
"examples": ["deviceUnlock", "runFullTrust", "broadFileSystemAccess"],
"description": "List of appx or msix installer restricted capabilities"
},
"Market": {
Expand Down Expand Up @@ -602,7 +615,7 @@
"$ref": "#/definitions/ProductCode"
},
"UpgradeCode": {
"$ref": "#/definitions/ProductCode"
"$ref": "#/definitions/UpgradeCode"
},
"InstallerType": {
"$ref": "#/definitions/InstallerType"
Expand Down Expand Up @@ -634,8 +647,10 @@
"properties": {
"DefaultInstallLocation": {
"type": [ "string", "null" ],
"minLength": 1,
"minLength": 2,
"maxLength": 2048,
"pattern": "^[%\\]",
"examples": ["%ProgramFiles%\\ContosoApp"],
"description": "Represents the default installed package location. Used for deeper installation detection."
},
"Files": {
Expand Down
Loading