@echo off
setlocal

if exist iTunes64Setup.exe set installer=iTunes64Setup.exe
if exist iTunesSetup.exe set installer=iTunesSetup.exe
if exist QuickTimeInstaller.exe set installer=QuickTimeInstaller.exe
if not defined installer goto noinstaller

7z e -y -o"temp" %installer% AppleApplicationSupport.msi
7z e -y -o"qaac required files" temp\AppleApplicationSupport.msi CoreAudioToolbox.dll CoreFoundation.dll ASL.dll icudt46.dll libdispatch.dll libicuin.dll libicuuc.dll objc.dll pthreadVC2.dll
del temp\AppleApplicationSupport.msi
rd temp
goto exit

:noinstaller
echo Could not find QuickTimeInstaller.exe, iTunesSetup.exe or iTunes64Setup.exe. Aborting.
pause

:exit
endlocal