[Launch]
ProgramExecutable=TreeSizeFree\TreeSizeFree.exe
DirectoryMoveOK=yes
SupportsUNC=yes

[Activate]
Registry=true
XML=true

[RegistryKeys]
TreeSizeFreePortable=HKCU\Software\Classes\Folder\shell\Treesize Free
-=HKCU\Software\Classes\Directory\Background\shell\Treesize Free

[DirectoriesMove]
AppData=%APPDATA%\JAM Software\TreeSize Free

[DirectoriesCleanupIfEmpty]
1=%APPDATA%\JAM Software

[FilesMove]
settings\*.xml=%PAL:AppDir%\TreeSizeFree

[FileWrite1]
File=%PAL:DataDir%\settings\TreeSizeFreePortable.reg
Type=INI
Section=HKEY_CURRENT_USER\Software\Classes\Folder\shell\Treesize Free\command
Key=@
Value='"\"%PAL:AppDir:DoubleBackslash%\\TreeSizeFree\\TreeSizeFree.exe\" /CONTEXT \"%1\""'

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\settings\GlobalOptions.xml
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir%\
Replace=%PAL:Drive%%PAL:PackagePartialDir%\

[FileWrite3]
Type=Replace
File=%PAL:DataDir%\settings\GlobalOptions.xml
Find=%PAL:LastPortableAppsBaseDir%\
Replace=%PAL:PortableAppsBaseDir%\

[FileWrite4]
Type=Replace
File=%PAL:DataDir%\settings\GlobalOptions.xml
Find=%PAL:LastDrive%\
Replace=%PAL:Drive%\

[FileWrite5]
Type=XML text
File=%PAL:DataDir%\settings\GlobalOptions.xml
XPath=/GlobalOptions/ContextMenuEntries
Value=4
