Click here to Skip to main content
15,742,268 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I Try Download Specified Exe File From Internet And Store It With this code

byte[] down = Web.DownloadData("Address");

System.IO.File.WriteAllBytes("myfile.exe", down);

But When I Want To Execute File This Error Occurred :

The NTVDM CPU Has Encountered An Illegal Instruction

But When I Download This File Normally with (idm) Execute

What Is Problem ?

This My Address And This Executed File:


Updated 20-Oct-11 20:09pm

1 solution

A parameter should be System.Uri or string. If this is a string, it should get URI format, not just "Address"; it should be something like "http://www.domain.tld/myDirectory/myFile.exe".

Besides, how do you know that executable file is good in first place, compiled for your platform, etc.?

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900