Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for productcode even if extension doesn't match #151

Closed
wants to merge 2 commits into from
Closed

Conversation

Trenly
Copy link
Owner

@Trenly Trenly commented Feb 7, 2022

  • Closes Check for ProductCode if url does not end with .msi #150
    @OfficialEsco This should do what you wanted, but I will warn you that if the installer type is MSI or WIX and the file that is downloaded is not truly an MSI file then it will likely error out. The more intelligent that we try to make things, the bigger the chance that incorrect input will cause things to go 💥

@OfficialEsco
Copy link
Collaborator

weeeell, if its not .msi @vedantmgoyal2009 got a problem

it did however fail to identify it as wix 🤔

@Trenly Trenly force-pushed the v2.1.0 branch 3 times, most recently from e550cef to f707aec Compare February 11, 2022 17:32
@Trenly
Copy link
Owner Author

Trenly commented Feb 11, 2022

@OfficialEsco Also think I fixed this one; Some light testing allowed it to detect the ProductCode using https://sourceforge.net/projects/scidavis/files/SciDAVis/2/2.7/scidavis.2.7-win-dist.msi/download as the download link in quick update mode. Doesn't work in Full Update mode because the detection happens before InstallerType is specified, but will look to fix that separately since it requires a bit more refactoring.

@OfficialEsco
Copy link
Collaborator

Oh yeah as i said

it did however fail to identify it as wix 🤔

Step to replicate

PS .\Tools\YamlCreate.ps1 -AutoUpgrade -SkipPRCheck -PackageIdentifier Microsoft.RemoteDesktopClient -PackageVersion 1.2.2688.0


Found Existing Version: 1.2.2688.0

Updating Manifest Information. This may take a while...

Yaml file created: C:\Users\Esco\GitHub\winget-pkgs\manifests\m\Microsoft\RemoteDesktopClient\1.2.2688.0\Microsoft.RemoteDesktopClient.locale.en-US.yaml

Yaml file created: C:\Users\Esco\GitHub\winget-pkgs\manifests\m\Microsoft\RemoteDesktopClient\1.2.2688.0\Microsoft.RemoteDesktopClient.installer.yaml

Yaml file created: C:\Users\Esco\GitHub\winget-pkgs\manifests\m\Microsoft\RemoteDesktopClient\1.2.2688.0\Microsoft.RemoteDesktopClient.yaml
Manifest validation succeeded.


Do you want to submit your PR now?
  [Y] Yes
  [N] No

Enter Choice (default is 'Y'): n

or

PS .\Tools\YamlCreate.ps1 -mode 2 -SkipPRCheck -PackageIdentifier Microsoft.RemoteDesktopClient -PackageVersion 1.2.2688.0

Found Existing Version: 1.2.2688.0
Installer Entry #1:

        Architecture: x64
        InstallerType: msi
        Scope: user


[Required] Enter the download url to the installer.
Url: https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RWQvmX
Downloading Installer. . .
Installer Downloaded!
Processing installer data. . .
Installer updated!

Installer Entry #2:

        Architecture: x64
        InstallerType: msi
        Scope: machine


[Required] Enter the download url to the installer.
Url: https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RWQvmX
Installer Entry #3:

        Architecture: x86
        InstallerType: msi
        Scope: user


[Required] Enter the download url to the installer.
Url: https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RWQvmX
Installer Entry #4:

        Architecture: x86
        InstallerType: msi
        Scope: machine


[Required] Enter the download url to the installer.
Url: https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RWQvmX
Installer Entry #5:

        Architecture: arm64
        InstallerType: msi
        Scope: user


[Required] Enter the download url to the installer.
Url: https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RWQvmX
Installer Entry #6:

        Architecture: arm64
        InstallerType: msi
        Scope: machine


[Required] Enter the download url to the installer.
Url: https://query.prod.cms.rt.microsoft.com/cms/api/am/binary/RWQvmX

Yaml file created: C:\Users\Esco\GitHub\winget-pkgs\manifests\m\Microsoft\RemoteDesktopClient\1.2.2688.0\Microsoft.RemoteDesktopClient.locale.en-US.yaml

Yaml file created: C:\Users\Esco\GitHub\winget-pkgs\manifests\m\Microsoft\RemoteDesktopClient\1.2.2688.0\Microsoft.RemoteDesktopClient.installer.yaml

Yaml file created: C:\Users\Esco\GitHub\winget-pkgs\manifests\m\Microsoft\RemoteDesktopClient\1.2.2688.0\Microsoft.RemoteDesktopClient.yaml
Manifest validation succeeded.


Do you want to submit your PR now?
  [Y] Yes
  [N] No

Enter Choice (default is 'Y'): n

InstallerType remains msi

@OfficialEsco
Copy link
Collaborator

Late update but i have used this since the change and not had issues other than when i fked up + the no wix detection
But we probably need a safer method for bots

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.

Check for ProductCode if url does not end with .msi
2 participants