17 May 2018

Explaining the %WINDIR%\Installer Folder

While recently writing an MSI uninstaller script, I needed to be able to associate the GUID with the applications name. In the process, I was finally able to associate the MSI files inside the Installer folder with the application.

You may wonder why you want to know this. Most of this is probably just for general knowledge, but there are a couple of instances I can think of on why you might want to know. For one, I used it as described above. You may also want to know this if you are checking to see if the MSI is available to do an uninstall or a repair.

The MSI and MSP files inside the %WINDIR%\Installer folder are associated with the installed application or update in the following registry location:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\<Unique Identitier>\InstallProperties

The screenshot below shows an example of the unique MSI filename in the %Windir%\Installer directory associated with the installed application. The association is made under the LocalPackage.


Related Posts:

  • List all Local Administrators on a Computer I wrote this script to generate a list of local administrators on a PC. It saves the output to a text file at a central repository. The text file is named the computer name and contains a listing of all the local administr… Read More
  • Deploying Windows Management Framework 4.0 This PowerShell script will install WMF 4.0. It will return an error if the installation fails. You can download the script from here. <# .Author Mick Pletcher .Date 29 July 2014 .SYNOPSIS … Read More
  • List of Installed Updates This script will generate a clean list of Microsoft updates that were installed during a system build, making it drastically easier than having to parse through the log file. You open the powershell script up and update the… Read More
  • Deploying CMTrace CMTrace makes reading .log files much easier. Deploying it though can be somewhat tricky. I have written this PowerShell script that will install CMTrace and associates .log with the application. The association portion of … Read More
  • Import and Apply Local GPOs This script will import and apply a local GPO using the local GPO utility, ImportRegPol.exe, located here. The script is a wrapper that makes implementing this utility a snap. All that has to be done is to use the Micr… Read More

3 comments:

  1. One of the things to remember about the localpackage is that it is not just the a copy of the msi that ran on install. It's actually the merge of the msi and the applied transform (s) logic. This is how on repair your installation remembers the application language and other properties supplied by your administrator or ESD solution. Examining size of the locally cached msi will show you they are substantially smaller then the original msi. The files are referenced when needed for repair or reconfiguration from the full msi referenced in the installsource regvalue. Lost the source connection? Just find the original msi, update the regkey and you are back in business for repair.

    ReplyDelete
  2. O and another tip, on the %windir%\installer folder add the column "Subject" to "Name", "Date Modified", "Type" and "Size" that are already shown by default. The Subject column will tell you what each weird msi name actually is without going through registry manually.

    ReplyDelete
  3. This is not true that it is a merge, at least with Win 7 and later. I know this because Win7 started caching the original full MSI without stripping out the *.cab files so it could preserve the signature on the package and during maintenance operations show a valid publisher signature. IIRC before then, transforms were also cached and the log would show the transforms loading from the cached location.

    ReplyDelete