Self extracting EXE from email

Jul 25, 2010 at 11:39 PM

this is a great program.I have come across one issue, not sure whether its a bug.

When you email the archive.exe. the recipient cannot run the exe directly from email. it generates errors but if you save the archive.exe and double click, it works absolutely perfectly.  I think the issue is with creating the temp file. appreciate if you can shed a bit of light as to how i can get this to work.

Using zip As New ZipFile()
    zip.AddFile("c:\test.txt")
    zip.Comment = "This will be embedded into a self-extracting window-based exe"
    Dim options As New SelfExtractorSaveOptions
    options.Flavor = SelfExtractorFlavor.WinFormsApplication
    options.DefaultExtractDirectory = "C:\\ExtractHere"
    options.Quiet = True
    zip.SaveSelfExtractor("C:\archive.exe", options)
End Using

 

Asish

Jul 26, 2010 at 11:34 PM

would really appreciate some help

Coordinator
Jul 28, 2010 at 12:37 PM
Not sure. One idea: Why are you using double backslash in "c:\\ExtractHere" ? It is required in c# but not in VB. Beyond that, I suggest using procmon to figure out the problem. It could very well be what you suggest, a permissions issue related to the temp file.