My SSD drive is almost full, after checking with TreeSize Free, it seems a lot of space is taken by files inside c:\windows\installer\. Searching around, I conclude that some of files is safe to be deleted from that particular place. There is a VB script in http://blogs.msdn.com/b/heaths/archive/2007/01/31/how-to-safely-delete-orphaned-patches.aspx that detect which files that shouldn’t be deleted from c:\windows\installer.
I also know an application named WiCleanup from KZTechs that detect and delete the “safe” files but after I tried it, the confirmation of deletion for files one-by-one makes me uncomfortable. So, I decide, why not programming the application by myself? And this application is born!
I programmed the application in VB .NET language using the free Microsoft Visual Studio 2013 Community Edition. Without further a do, you can download the application here:
[button link=”http://www.ahowto.net/wp-content/uploads/2015/03/Release.zip”]Windows Installer Cleaner Binary Only[/button]
(Of course you need .NET framework 4.5 installed if you want to run this application)
[button link=”http://www.ahowto.net/wp-content/uploads/2015/03/wic_winform.zip”]Windows Installer Cleaner Full Source Code[/button]
How to use:
It’s quite straight forward. There are three buttons there, you just need to click on them sequentially.
- Click “Get Kept List” to see which files that you should keep on c:\windows\installer
- Click “Get Delete List” to get the files that should be safe to be deleted and their size.
- Click “Delete Files” to delete the detected files.
What I learn from building this application:
- how to create .NET application that need Administrator privilege (UAC things) when executed
- how to use COM object in .NET application
- how to use/import .dll from MS Windows in .NET
- some file operation in .NET (FileInfo, deleting files, file’s attribute)
The application is already tested on Windows 8.1 64-bit and Windows 7 SP1 64-bit. Both systems is running fine until now. 😀