tags:

views:

37

answers:

2

What is the difference between the executable files of a compiled program and an autorun program?

+1  A: 

Hope I understood your question

All autorun programs are executable files of a compiled program, but the reverse is not true.

Usually, a "autorun program" is a program as any other, with a specific name chosen by the Operating System to "autorun". The autorunness of a program is not a property of said program, but of the management layer above that program.

pmg
A: 

If by autorun, you mean scripted (no compiling necessary as in perl, python, bash)?

The difference is that with a compiled program, you compile it once and it becomes portable to other machines, regardless of the libraries and executables that were used to build the program. For instance, if you write a program in C, you can take the binary that's produced upon compilation and move it to other machines with similar architectures. The libraries and executables required to compile that program, glibc and gcc for example, are not required to exist on the other machines.

With scripted programs, the libraries and executables for that language have to exist on the machine that you port the program to. In other words, if you write a bash script, bash must exist on every machine that you port to so that it will be able to interpret the file. This is because the bash interpreter is called once you execute the file, then the interpreter reads in the file and performs whatever actions the file calls for.

With a scripted program, you're relying on the other users to have an environment that is very close to yours. If you write a python script under version 3.0 and want to distribute it, everyone who uses it must have python 3.0 installed on their system (or at least a version of python that offers compatible functionality). With a compiled program, as long as there are no outside non-language related dependencies and the machine has similar architecture, you can more easily use the program.

Andrew Sledge