Run program from a network drive

System manufacturer / System name
April 5, 2009 at 03:25:29
Specs: Microsoft Windows XP Professional, 2.071 GHz / 1535 MB
I have a compiled executable program placed on a network drive. The compiled program is about 12MB big. I thought that then I start the program, the whole program should be copied to my computer memory and be exectuted. But with WireShark (network packet sniffer) I see that my computer sometimes open, reads and closes the exe-file on the network. Not only one time at the start!
It reopen and read the exe-file mostly then I make choices in the programs menues and open new windows.
If I loose the connection with the network drive after the program is started the program hangs and crasch.
The program is 32-bits. Compiled with Visual Studio 2008 (C++) and is an MFC(Afx)-program.
Why is my computer reading the exe-file on the network after it has been started? I have checked the code but havent found any reason to this thing.
Maybe it is configurable in Visual Studio to place whole exe-file in memory?

See More: Run program from a network drive

Report •

April 5, 2009 at 05:23:21
When you run an .exe file, especially one as big as 12 Mbs, the entire programme isn't loaded into memory all in one chunk. It loads just enough to get it going and then goes back and loads other bits as needed.

How much and what that is actually loaded is determined by the compiler when it goes through the linking stage.

I think the only way you are going to get the application to load into memory in its entirety is to write the programme in one single module. Not really practical in an application as big as this.


Report •

April 11, 2009 at 02:37:50
Ok, thanks Stuart for the answer. But is it possibly to tell the compiler (Visual Studio C++ 2008) in some ways that the whole exe file should be loaded into memory and executed?
Maybe someone have a different solution for this problem?

The solution for us now is to place the .exe file on every computers C: before they start it.

Has someone more had a problem like this with big (12 - 16 MB) .exe files?

Report •

Related Solutions

Ask Question