Меню

Find patches installed windows

Uninstallable Patches

Whether a patch can be uninstalled depends upon how the patch was authored, the version of Windows Installer used to install the patch, and the changes made by the patch to the application. If a patch is not uninstallable, then the only way to remove the patch is to uninstall the entire application and reinstall without applying the patch being removed.

You can call for the uninstallation of patches applied with Windows Installer version 3.0 by using Command Line Options, the MsiRemovePatches function, or the RemovePatches method as described in the Uninstalling Patches section. The Windows Installer verifies that each of the patches listed for removal in the MSIPATCHREMOVE property is uninstallable. If the user does not have privileges to remove the patch, the patch is unknown for the product, patch policy prevents removal, or the patch was marked as not uninstallable, the installer returns an error indicating a failed installation transaction.

Windows Installer 2.0: Not supported. Patches applied using a version of Windows Installer that is earlier than Windows Installer 3.0 are not uninstallable.

Patches that are Not Uninstallable

A patch (.msp file) applied to an installed application is not uninstallable in the following cases. The only method to remove a patch that is not uninstallable is to uninstall the patched application and then reinstall the application without reapplying the patch. In this case, you must reapply any patches that you do not wish to be removed from the application.

Patches applied using a version of Windows Installer that is less than Windows Installer 3.0 are not uninstallable.

Patches applied to applications installed on a computer that has had the DisablePatchUninstall policy set by an administrator are not uninstallable. When this machine policyhas been set, no patches on the computer can be uninstalled, even by an administrator.

Patches that do not have a MsiPatchMetadata table in their database are not uninstallable.

Patches that do not include the following row in their MsiPatchMetadata table are not uninstallable. The patch is not uninstallable for other values of Company, Property, and Value.

Company Property Value
AllowRemoval 1

The patch has been applied to an application installed in a context for which the user has insufficient privileges to uninstall patches. The words «Not Allowed» in the following table indicate that an administrator or non-administrator user cannot uninstall patches from patched applications installed in this context. The word «Allowed» in this table means that privileges do not prevent an administrator or non-administrator user from uninstalling patches, however for any of the other reasons discussed in this section, it still might not be possible to uninstall the patch.

application Installation Context Administrator Uninstall of Patch Non-Administrator Uninstall of Patch
Per-Machine Allowed Generally Not Allowed The only exception is if the patch was applied using (LUA) patching. A patch marked as a LUA patch is uninstallable by either administrators or non-administrators. LUA patching is only available for packages installed per-machine from media and require special authoring.
Per-User Non-Managed for Current User Allowed Allowed
Per-User Non-Managed for Different User Not Allowed Not Allowed
Per-User Managed for Current User Allowed Not Allowed
Per-User Managed for Different User Not Allowed Not Allowed

A major upgrade applied by a patch is not uninstallable. Major Upgrades of an application should be performed by installing the upgraded application (.msi file) rather than a patch.

Patches applied to an administrative installation are not uninstallable. Patching administrative installations is not recommended. The current set of patches should be applied on the user’s computer after the user installs the application from the administrative image. This can prevent the package code cached on the user’s computer from becoming different than the package code on the administrative installation. If the package code cached on the user’s computer becomes different from that on the administrative installation, reinstall the application from the administrative installation and then patch the client computer.

When a patch adds new content to any of the tables in the following list, Windows Installer marks the patch as being not uninstallable. An uninstallable patch can add new files, assemblies, registry entries, components, or features to an installation by adding new rows to database tables that are not included in this list.

Find patches installed windows

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

I want a script to list all the patches/updates installed in my PC. I tried the below script but it does not give me complete list of patches [SQL, Visual Studio, some Office patches are not listed]

$updateSearcher = new-object -com «Microsoft.Update.Searcher»
$totalupdates = $updateSearcher.GetTotalHistoryCount()
$patchList=$updateSearcher.QueryHistory(1,$totalupdates)

Please let me know if there is any way to achieve this.

Answers

I use following script, which works fine for me:

Thanks & Regards
Bhavik Solanki

Please click “Mark as Answer” if this post answers your question and click «Vote as Helpful if this Post helps you.

All replies

It’s more complicated. Simplest is use this module:

Get-WUList -IsInstalled -MicrosoftUpdate

I tried but it didnt work. Am i missing something ??

What didn’t work ?? Can you write more detail ??

PS. I can’t load this img.

Sorry for the delay. I tried the Get-WUList module as below but didnt get the expected result

import-module .\Get-WUList.ps1
Get-WUList -IsInstalled -MicrosoftUpdate | select KB >c:\a.txt ——- This didnt listed all the KBs and also listed some other KBs which are not listed «View Installed Updates»
Get-WUList -MicrosoftUpdate | select KB >c:\btxt — Even this gave the output similar to the above.

I am trying to workout a script that can generate a list of all the Microsoft updates [OS, Office, Visual Studio, SQL, .Net] listed in «View Installed Updates».

Find patches installed windows

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

I want a script to list all the patches/updates installed in my PC. I tried the below script but it does not give me complete list of patches [SQL, Visual Studio, some Office patches are not listed]

$updateSearcher = new-object -com «Microsoft.Update.Searcher»
$totalupdates = $updateSearcher.GetTotalHistoryCount()
$patchList=$updateSearcher.QueryHistory(1,$totalupdates)

Please let me know if there is any way to achieve this.

Answers

I use following script, which works fine for me:

Thanks & Regards
Bhavik Solanki

Please click “Mark as Answer” if this post answers your question and click «Vote as Helpful if this Post helps you.

All replies

It’s more complicated. Simplest is use this module:

Get-WUList -IsInstalled -MicrosoftUpdate

I tried but it didnt work. Am i missing something ??

What didn’t work ?? Can you write more detail ??

PS. I can’t load this img.

Sorry for the delay. I tried the Get-WUList module as below but didnt get the expected result

import-module .\Get-WUList.ps1
Get-WUList -IsInstalled -MicrosoftUpdate | select KB >c:\a.txt ——- This didnt listed all the KBs and also listed some other KBs which are not listed «View Installed Updates»
Get-WUList -MicrosoftUpdate | select KB >c:\btxt — Even this gave the output similar to the above.

I am trying to workout a script that can generate a list of all the Microsoft updates [OS, Office, Visual Studio, SQL, .Net] listed in «View Installed Updates».

How to patch on Windows?

Given a (source) patch file, what’s the easiest way to apply this patch on the source files under Windows?

A GUI tool where I can visually compare the unchanged-changed source lines would be great.

4 Answers 4

Patch for Windows is what you’re looking for.

Thanks to Macke, a good way to apply a patch file under Windows OS is using Git. As I understood, Git is a version control solution like SVN.

Here is a guideline to apply a patch :

  • First of all, download the latest release of the Windows Git Edition here : GIT
  • With the cmd prompt, change directory to the patch file and files to patch
  • Now you can use the following command line :

Thank you Macke

Not that since Git 2.3.3 (March 2015), you can use git apply —unsafe-paths to use git apply outside a git repo.

» git apply » was not very careful about reading from, removing, updating and creating paths outside the working tree (under —index / —cached ) or the current directory (when used as a replacement for GNU patch).

The documentation now includes:

By default, a patch that affects outside the working area (either a Git controlled working tree, or the current working directory when » git apply » is used as a replacement of GNU patch) is rejected as a mistake (or a mischief).

When git apply is used as a «better GNU patch», the user can pass the —unsafe-paths option to override this safety check.
This option has no effect when —index or —cached is in use.

So if you have git installed, git apply could help, even outside of any git repo.

Читайте также:  Words free windows phone
Adblock
detector