PDA

View Full Version : Winnt\Installer Folder



zeplynne
06-04-2004, 08:43 AM
What, if anything, can you remove from the Winnt\Installer or Windows\Installer folder on a periodic basis?
Thanks.

RobertDickau
06-04-2004, 09:25 AM
Any cached MSIs and directories that refer to products you've uninstalled can be removed; but there's no fixed list of things to delete periodically...

For what it's worth, you can enumerate cached packages for installed products using VBScript code similar to the following, running it with cscript /nologo cached.vbs:

on error resume next

set msi = createobject("WindowsInstaller.Installer")

set prods = msi.products

for each p in prods

wscript.echo msi.productinfo(p, "InstalledProductName")
wscript.echo "PackageName: " & msi.productinfo(p, "PackageName")
wscript.echo "LocalPackage: " & msi.productinfo(p, "LocalPackage")
wscript.echo ""

next

set msi = nothing

zeplynne
06-04-2004, 10:02 AM
Thank you.

rowbot
07-25-2005, 10:54 AM
Robert, any idea why a cached msi/folder isn't removed by the engine when a product is completely uninstalled?

Thanks,

RobertDickau
07-26-2005, 09:23 AM
Hmmm... Some possible causes (MSI bug, MSI handle being left open by custom action) are mentioned in this MS MSI chat transcript: http://msdn.microsoft.com/chats/transcripts/windows/windows_051303.aspx...