I have written a code which includes the Windows.h header, and compiled it using Visual Studio.
I have then tried to run the EXE file alone on my other computer, which appears to lack the specified header.
How can I run it on the other computer without having to install VS?
Executable file does not need header. It needs for dynamic libraries. They are distrubuted with Visual Studio or with Visual Studio Redistributable Package. You can distribute your program with that package. Another option - using static linking. With static linking executable will have all needed data and code.