hi is there any command to check if package installed?
Is this with respect to dependencies? Like frameworks or runtimes you may depend on? Or other packages?
@KevinLaMS Just as we can easily install packages (winget install id), a simple command (winget exist id) can check the user's system for the installation of that package and return true or false
No, there's no implementation for that yet. Subscribe to #153
It would be even more helpful if we could also specify a PowerShell ExistsScript script in the manifest to check if the package needs to be installed to support the exist option. The winget exist sysinternals would use that script to return true or false. If provided, it could also run before the install to see if it even needs to install anything and it could run after the install to verify it was installed. This is a pattern used by DSC so its something the PowerShell community is aware of.
I'd like the ability to know which packages are installed / have been installed via winget; and to ideally export to a file for future setups. My use case is a brand new Surface Laptop 3, migrating from an HP, would be great to know what I just winget-installed, and to export to a file for a future new setup, similar to a Brewfile. I understand that winget is not homebrew, but this would be very useful.
@andypiper the experimental "list" command will tell you everything that is installed on the system. We have #220 export/import on the backlog to do what you're talking about.
Most helpful comment
It would be even more helpful if we could also specify a PowerShell
ExistsScriptscript in the manifest to check if the package needs to be installed to support the exist option. Thewinget exist sysinternalswould use that script to return true or false. If provided, it could also run before the install to see if it even needs to install anything and it could run after the install to verify it was installed. This is a pattern used by DSC so its something the PowerShell community is aware of.