473,729 Members | 2,235 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

why adodb.strem downloding works for everything but self extracting files?

Avi
hi,

Can anyone tell me what the problem is and how to solve it

The following piece of code resides on an asp page on the server and
is used to download files from the server to the machine accessing the
abobe mentioned asp page. It WORKS for every type of file when I
change the content type according to the file type, but it won't work
with self extracting files. When an end user downloads a self
extracting file by accessing the code, the whole file is downloaded on
its entire size, but trying to run the self extracting file by double
clicking on it yields a momentary DOS-like black screen and not what
is expected -- that the file start running by unzipping itslef and
then executing some setup or install file. Further more, as something
that migh give the experts of you a hint, even though the file is
downloaded on all its bytes, the icon associated with the file on the
server DOES NOT appear with the downloaded file.

Response.Conten tType ="Applicatio n/exe"
Response.AddHea der "Content-Disposition:"," attachment;file name=myselfextr ct.exe"
Set objStream = Server.CreateOb ject("ADODB.Str eam")
objStream.Open
objStream.Type = 1
objStream.LoadF romFile "c:\myselfextrc t.exe"
Response.Binary Write objStream.Read( )
objStream.Close
set objStream = Nothing
Set objFile = Nothing
thanks

Avi
Jul 19 '05 #1
2 2537
I don't see anything wrong with your code. I'd try disabling any AV
software or any sort of content filtering you have installed on the client
and/or the server and see if that makes a difference.

Ray at home

"Avi" <av******@opton line.net> wrote in message
news:ab******** *************** ***@posting.goo gle.com...
hi,

Can anyone tell me what the problem is and how to solve it

The following piece of code resides on an asp page on the server and
is used to download files from the server to the machine accessing the
abobe mentioned asp page. It WORKS for every type of file when I
change the content type according to the file type, but it won't work
with self extracting files. When an end user downloads a self
extracting file by accessing the code, the whole file is downloaded on
its entire size, but trying to run the self extracting file by double
clicking on it yields a momentary DOS-like black screen and not what
is expected -- that the file start running by unzipping itslef and
then executing some setup or install file. Further more, as something
that migh give the experts of you a hint, even though the file is
downloaded on all its bytes, the icon associated with the file on the
server DOES NOT appear with the downloaded file.

Response.Conten tType ="Applicatio n/exe"
Response.AddHea der "Content-Disposition:"," attachment;file name=myselfextr ct.exe" Set objStream = Server.CreateOb ject("ADODB.Str eam")
objStream.Open
objStream.Type = 1
objStream.LoadF romFile "c:\myselfextrc t.exe"
Response.Binary Write objStream.Read( )
objStream.Close
set objStream = Nothing
Set objFile = Nothing
thanks

Avi

Jul 19 '05 #2
Hi Ray,

thanks for the prompt reply. I do not have any content-filtering
software (as far as I can tell). I only have a Netgear router that
serves as a firewall, just like any other router. In any case, I built
two asp pages using the code I provided in my previous post, each of
those asp pages contain the same code, and the only difference between
the two is the file name targeted to be downloaded:

The first url corresponds to downloading a zip file with .zip extension
which, once downloaded, can be unzipped and run ( there is onlt one exe
file inside that displays 'hello world' message). The second url
exemplifies the problem; it contains the same zip file but as a
self-extract file that does not work as expected once downloaded. The
downloading person, once double clicking on the file, triggers automatic
extraction of the zip file into some temporary file followed by
execution of the .exe file embedded therein ( the same 'hello world'
message file).
http://24.191.235.110:40002/dowl1.asp

http://24.191.235.110:40002/dowl2.asp
Please note that the downloaded self-extracted file works perfectly in
in the orignal machine where it was created, and, as I mentioned before,
it bears an icon different than the one associated with it after being
downloaded.

I hope those urls can make any difference in terms of figuring out the
problem.

thanks

Avi

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2637
by: Nazgul | last post by:
Hi! I want to implement a small tool in Python for distributing "patches" and I need Your advice. This application should be able to package all files chosen by a user into a self-extracting.exe so that when you click on it, it will extract the files and run setup.exe which among the other will copy these files into respective folders (the absolute paths could be written in some config file). Of course the files should be extracted first...
1
1530
by: Sylwia | last post by:
Hi! How can I create in Python a self-extracting file containing some files that automaticly starts the setup program when I double click on the file? Is that possible in Python? Thank you in advance, Sylwia
4
9308
by: KLomax | last post by:
I have a VB6 com object that uses ADO 2.1 for data access. I have referenced this object in a aspx application. It works fine on my local development machine. On our staging server, it errors when trying to instantiate the com object. This object runs fine in another asp application on the same box, so it is not the object itself. I am remotely compiling the application on our staging server. The full error message is below.
6
2563
by: Andrew Edwards | last post by:
I have program that downloads a file from the internet and extracts it using calls to system(). All files are extracted into the directory where my program is located. How do I redirect the extracted files to a specified directory? I can use the following: system("move *.* c:\directory"); However, this will move my program. I end up having to call system for every
0
1489
by: k_nil | last post by:
I have a link on my web page for a self extracting executable file placed on the server. When the link is clicked, 1) i could see dialog box with open or save options 2) when open clicked, self extracting exe starts. But...the self extracting exe when downloaded on my mahcine, creates a wierd named folder in c:\. how would this folder getting cretaed? Can i make to create this folder in temp files.
2
7072
by: Robert McEuen | last post by:
Sorry if this double-posts...Google doesn't do a very good job of communicating whether something has posted or not. Using Access 97, WindowsXP Is there a way to pass command line parameters (such as password and extract path) when opening a WinZip self-extracting file on a machine that does not have WinZip installed? I've seen in other threads where the Shell command is used to call the
2
2210
by: bjm | last post by:
I created a self extracting zip file with about 9000 files in it. I extracted it manually from the command line without a problem. However, when I tried to do the same extraction at the same location with the same arguments (using the Process class), a command prompt opens, and it begins extracting files. After about 70 files have been extracted, the main form for my application loses focus and I get an hourglass cursor (which is normal,...
6
4453
by: Werner | last post by:
Hi, I try to read (and extract) some "self extracting" zipefiles on a Windows system. The standard module zipefile seems not to be able to handle this. False Is there a wrapper or has some one experience with other libaries to
1
1939
by: luckyshahoo | last post by:
I have to create a C# windows application that will take 4 different kind of files (a.exe, b.dll, c.doc etc....) and the application should generate a .exe say "MySetup.exe" file (self extracting exe). On clicking the "MySetup.exe" the files should get extracted to a folder. After extracting the files, it should register the "b.dll" and start "a.exe". requesting your help on this.... Lucky
0
8913
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8761
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9426
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9200
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6016
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2162
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.