Hi all,
Below is a winapp2.ini entry that I wrote for the Lenovo (formerly IBM) ThinkVantage System Update program. This is a software/driver update program installed on many late IBM and Lenovo desktop and laptop systems. The winapp2.ini entry cleans out the session directory, which holds all downloaded installers and temporary files and can easily grow to multiple GB in size (see many complaints about this across the web). I have tested the entry on ThinkVantage System Update version 4.01 running on Windows 7 and partially tested on ThinkVantage System Update version 3.15 on Windows XP (in a VM, which prevented full testing).
[ThinkVantage System Update*]
LangSecRef=3024
DetectFile=%ProgramFiles%\Lenovo\System Update\tvsu.exe
Default=False
FileKey1=%ProgramFiles%\Lenovo\System Update\session|*.*|RECURSE
; Must exclude system dir or program will not launch
ExcludeKey1=FILE|%ProgramFiles%\Lenovo\System Update\session\system|*.*
; Need to exclude tvsutemp dir and updates.ser file to preserve hidden updates
ExcludeKey2=FILE|%ProgramFiles%\Lenovo\System Update\session\tvsutemp|*.*
ExcludeKey3=FILE|%ProgramFiles%\Lenovo\System Update\session\updates.ser
; To preserve in-program installation history, uncomment ExcludeKey4 (@ ~4KB/update)
;ExcludeKey4=FILE|%ProgramFiles%\Lenovo\System Update\session\|*.xml
Warning=This option will clear the ThinkVantage System Update in-program installation history. However, this will not result prompting/installing updates again.
I hope you find it useful.
Edit: Further investigation showed that the in-program installation history is cleared unless the XML file for each update is retained. These updates have no well-defined naming scheme and are approximately 3KB in size (often with about 1KB of unrelated XML files each). Since I've not found any value to the installation history, I don't think it is worth the disk space, but since others may disagree I have added a warning and the option to exclude the necessary file.