<% 'response.buffer = false strAbsFile = "C:\Inetpub\wwwroot\www.zilog.com\download\General\devtools\zsfp_SFP_2.0.1_06041802.exe" set objFSO = server.createobject("scripting.filesystemobject") If objFSO.FileExists(strAbsFile) Then Set objFile = objFSO.GetFile(strAbsFile) '-- first clear the response, and then set the appropriate headers Response.clear Response.AddHeader "Content-Disposition", "attachment; filename=" & objFile.Name Response.AddHeader "Content-Length", objFile.Size Response.ContentType = "application/octet-stream" Set objStream = Server.CreateObject("ADODB.Stream") objStream.Open '-- set as binary objStream.Type = 1 Response.CharSet = "UTF-8" '-- load into the stream the file objStream.LoadFromFile(strAbsFile) '-- send the stream in the response 'Response.BinaryWrite(objStream.Read) 'new code for intStreamSize = 0 to objStream.size intStreamSize = intStreamSize + 4000000 Response.BinaryWrite(objStream.Read(4000000)) Response.Flush next objStream.Close Set objStream = Nothing Set objFile = nothing else 'Response.Redirect "/errors/404page.asp" 'Response.write("File not found.") end if %>