Extracting exe from Internet Explorer 8.0

Aug 31, 2009 at 2:38 PM

I am receiving the following error when attempting to download a self-extracting exe file that was created with the DotNetZip library. "Microsoft IE Execute shell has stopped working".  This happens if I try to open the file from the website versus right clicking on the exe file and saving the file.

Coordinator
Aug 31, 2009 at 8:54 PM

Are you saying that if you right click and select "Save As..." the file is successfully saved, and can be opened?

And if you do not right-click and select "Save As...", then you get the error?

Can I see the server-side code that you use to generate the zip file ?

 

Sep 1, 2009 at 2:22 AM

I am saying that when I click on a link to the exe file, it it trying to be opened. Then this error mention earlier occurs.

Here is the code:

Public Function GenerateOutputZipFile(ByVal ProjectId As Integer, ByVal strFilePath As String) As Boolean

Dim ProjectInfo As New Business.ProjectInfo

GenerateOutputZipFile = False

ProjectInfo.GetProjectInformation(ProjectId)

Dim dirInfo As New DirectoryInfo(strFilePath)

If dirInfo.Exists Then

Using zip As ZipFile = New ZipFile()

For Each dirInfo In dirInfo.GetDirectories()

If Not dirInfo.Name = "Orders" And Not dirInfo.Name = "tmpOrders" Then

Dim fFile As FileInfo

For Each fFile In dirInfo.GetFiles("*")

zip.AddFile(strFilePath & dirInfo.Name & "\" & fFile.Name, dirInfo.Name)

Next

End If

Next

GenerateOutputZipFile = True

zip.SaveSelfExtractor(strFilePath & "Output.exe", SelfExtractorFlavor.WinFormsApplication, "C:\Modernfold Project Manager\" & ProjectInfo.ProjectName & " (" & ProjectInfo.ProjectNumber & ")")

End Using

End If

ProjectInfo = Nothing

End Function

Jason Rush
Programmer
Modernfold, Inc.

317.468.6743 - Office

317.448.6571 - Cell

Coordinator
Sep 1, 2009 at 2:28 AM

Ah, ok.

The code you use to generate the file looks reasonable.

What if you click "Save as....". then what?  Does it work?

Your app does a bunch of things, one is "produce a SFX" and another is "download a file via the browser".   I think you need to decouple these things (and maybe other things) to figure out where the problem lies.   If you run the SFX on the server machine, where it was produced, does it run successfully?

If you transfer that file via some mechanism other than the browser to the client machine, and then run it, does it work?   What if you use Firefox instead of IE to do the transfer?

and so on. . .

Sep 1, 2009 at 2:31 AM

If you click save as and save to the local system then click run… it works. I was wanted to be able to click on a hyperlink to the file, then click open and have it extract to the local “client” computer.

Jason Rush
Programmer
Modernfold, Inc.

317.468.6743 - Office

317.448.6571 - Cell

Coordinator
Sep 1, 2009 at 4:04 AM

I understand.

With that information, it is obvious that the problem is not in the generation of the SFX/ZIP file, it is in the transfer of the file.  The SFX file is correct and works fine.  Something goes wrong when you transfer it and then try to run it.   

There are sevevral possibilities. First, the SFX requires the .NET Framework v2.0 (or later) on the client machine. Have you verified that is the case?  IF there is no .NET Framework on the browser machine, running the exe will fail.  I don't know how it will fail because I don't have a machine to test it on.  But it will fail. In this case the exe may be received correctly and intact on the client machine, but it is still useless because the necessary pre-requisites are not present.

Another possibility is that the file is being corrupted during transmission.  If I were troubleshooting this I would hook up Fiddler to the browser to see if everything was downloading correctly.  check the length of the transfer.   You may also have a cached copy of a corrupted version of the SFX file in the IE Cache.  In this case you will get the same bad result repeatedly.  Clearing the IE cache (Tools...Internet Options...Delete Browsing History)  would solve it, if this is your problem.

Maybe you might try to map the .exe extension to an HttpModule (.ashx) that directly supports the download of the file.

Definitely does not sound like a DotNetZip problem though.  Good luck.

 

Nov 3, 2009 at 12:12 AM

Hi,

I am geting a Secutiry Exception when I try to download the SFX just clicking on the it in IE. I can download the file using save as traget option, and the file after downloads runs 100% without an error.

How to set the security permissions to download the file. Is this an IE settings issue ????

 

Regards

Riaz Afridi