I have been setting up multiple IIS servers for HTTP distribution points and was getting tired of manually changing the MIME types. Here is a super quick script for Windows Server with IIS7 to add the MIME types automatically:
cd %windir%system32inetsrv
rem Remove Existing MIME Types
appcmd set config /section:staticContent /-"[fileExtension='.dmg',mimeType='file/download']"
appcmd set config /section:staticContent /-"[fileExtension='.pkg',mimeType='application/octet-stream']"
appcmd set config /section:staticContent /-"[fileExtension='.mpkg',mimeType='application/vnd.apple.installer+xml']"
appcmd set config /section:staticContent /-"[fileExtension='.bom',mimeType='file/download']"
appcmd set config /section:staticContent /-"[fileExtension='.',mimeType='file/download']"
appcmd set config /section:staticContent /-"[fileExtension='.',mimeType='application/octet-stream']"
rem Add New MIME Types
appcmd set config /section:staticContent /"[fileExtension='.dmg',mimeType='file/download']"
appcmd set config /section:staticContent /"[fileExtension='.pkg',mimeType='application/octet-stream']"
appcmd set config /section:staticContent /"[fileExtension='.mpkg',mimeType='application/vnd.apple.installer+xml']"
appcmd set config /section:staticContent /"[fileExtension='.bom',mimeType='file/download']"
appcmd set config /section:staticContent /"[fileExtension='.',mimeType='file/download']"
appcmd set config /section:staticContent /"[fileExtension='.',mimeType='application/octet-stream']"
