Typically, the answer is no.
If a program requires a setup (in other words, if you had to install the program on the first machine), then copying the program file from that machine to another machine will typically not work.
Typically, it won’t work because the setup process didn’t happen. The setup process did things to the original machine that you wouldn’t be copying if you copied just the executable file.
The kinds of things that it might be doing are: