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

Feature Request: Provide Additional Win Update Functionality #40

Open
ryangurn opened this issue Aug 29, 2021 · 3 comments
Open

Feature Request: Provide Additional Win Update Functionality #40

ryangurn opened this issue Aug 29, 2021 · 3 comments

Comments

@ryangurn
Copy link

I noticed while reading the code within winupdate.go that there are two private functions. One for listing updates and another for update history. It would be quite useful to be able to access this type of information through some public functions.

I don't think that it would be difficult to add a public version of listUpdates() that provided the output using the struct already existing in the shared folder. updateHistory() based on my review could potentially just be made public with no changes.

I would ask that there is some consideration for making the information that those two functions provide accessible outside UpdatesPending() if possible.

Its also possible that I am misunderstanding the code in some way, so if it is already possible to access this data through UpdatesPending() please advise me so I can attempt to access this information for a project of mine.

@ryangurn
Copy link
Author

It doesn't appear that UpdatesPending() shows any history or list of updates but again maybe im using it incorrectly.

@iamacarpet
Copy link
Owner

Sorry guys I hadn’t seen the notification for this…

I really struggled to implement anything useful in the Windows Update space, especially that is compatible with Windows 10/11

There are some PowerShell utils that I tried to decompile & replicate but on further testing, none of those really worked like I expected either..

It’s been a while but in the end we came to the conclusion that the GUI is the source of truth & none of the CLI tools or libs have a good way to access the data.

I’m happy to take advice on this if anyone has any?

@ryangurn
Copy link
Author

Im not entirely sure the best method to go with however WMI might provide some insight.

Looking through https://docs.microsoft.com/en-us/previous-versions//aa390887(v=vs.85)?redirectedfrom=MSDN

In this there is Win32_Patch, Win32_PatchFile and Win32_PatchPackage. I don't know but these might be helpful to figure out if there are any updates available. Not for all applications for at least for the operating system itself.

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

No branches or pull requests

2 participants