!macro CustomCodePreInstall
	${GetParent} $INSTDIR $1
	${If} ${FileExists} "$1\PushoverPortable\App\AppInfo\appinfo.ini"
	${AndIfNot} ${FileExists} "$INSTDIR\App\AppInfo\appinfo.ini"
		CreateDirectory "$INSTDIR\Data"
		CopyFiles /SILENT "$1\PushoverPortable\Data\*.*" "$INSTDIR\Data"
		Rename "$1\PushoverPortable" "$INSTDIR\Data\PushoverPortableLegacyCopy"
	${EndIf}
!macroend
