/SWAPRUN (Load Linker Output to Swap File)


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at -SWAPRUN (Load Linker Output to Swap File).


## Remarks  
 The /SWAPRUN option tells the operating system to first copy the linker output to a swap file, and then run the image from there. This is a Windows NT 4.0 (and later) feature.  
 If NET is specified, the operating system will first copy the binary image from the network to a swap file and load it from there. This option is useful for running applications over the network. When CD is specified, the operating system will copy the image on a removable disk to a page file and then load it.  
### To set this linker option in the Visual Studio development environment  
1.  Open the project's **Property Pages** dialog box. For details, see [Setting Visual C++ Project Properties](../Topic/Working%20with%20Project%20Properties.md).  
2.  Click the **Linker** folder.  
3.  Click the **System** property page.  
4.  Modify one of the following properties:  
    -   **Swap Run From CD**  
    -   **Swap Run From Network**  
### To set this linker option programmatically  
1.  See [SwapRunFromCD](assetId:///P:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.SwapRunFromCD?qualifyHint=False&autoUpgrade=True) and [SwapRunFromNet](assetId:///P:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.SwapRunFromNet?qualifyHint=False&autoUpgrade=True) properties.  
## See Also  
 [Setting Linker Options](../Topic/Setting%20Linker%20Options.md)   
 [Linker Options](../Topic/Linker%20Options.md)