${SegmentFile}

${Segment.OnInit}
	; Borrowed the following from PAL 2.2, Remove on release of PAL 2.2
		; Work out if it's 64-bit or 32-bit
	System::Call kernel32::GetCurrentProcess()i.s
	System::Call kernel32::IsWow64Process(is,*i.r0)
        System::Call kernel32::Wow64EnableWow64FsRedirection(i0)
	${If} $0 == 0
		StrCpy $Bits 32
	${Else}
		StrCpy $Bits 64
	${EndIf}
!macroend

${SegmentPrePrimary}
        CreateDirectory "$APPDATA\Portable\"                 
!macroend

${SegmentPostPrimary}
        RMDir /r "$PROGRAMFILES"    
        RMDir /r "$WINDIR"
        RMDir /r "$APPDATA\Portable\" 
!macroend