To bypass the Data Execution Prevention (DEP) asking to be turned off when connecting a .NET application with anyActiveX API at windows 7/8 and above, whichis not good because it is a security breach and it became difficult to do this each time for each plug-in since almost everyone has Windows 7 and above now. The developersmust run the below script on any EXE released from .NET that uses VertexFX ActiveX API. This script must run from the Visual Studio Command Prompt.
The next steps will show youhow to run the VS Command Prompt:
A- In windows 8.1
- 1- On the Start screen, press CTRL + TAB to open the Apps list and then press V. The list will include all installed Visual Studio command prompts. (To open the Start screen, press the Windows logo keyon your keyboard.)
- 2-Choose the Developer Command Prompt(or the command prompt you want to use).
B- In Windows 8
- 1– On the Start screen, press the Windows logo key+ Z.
- 2- Choose the Apps view icon at the bottom of the screen and then press V. The list will include all installed Visual Studio command prompts.
- 3- Choose the Developer Command Prompt (or the command prompt you want to use).
C- In Windows 7
- 1- Choose Start , expand All Programs , and then expand Microsoft Visual Studio .
- 2- Depending on the version of Visual Studio you have installed, choose Visual Studio Tools,Visual Studio Command Prompt, or the command prompt you want to use.
After you run the VS Command Prompt, run the below command link:
editbin.exe /nxcompat:no “c:pathtoexefile.exe”
* Note that you must change the path to your EXE’s path.
After that, this EXE will be compatible with all versions of Windows without the need to do anything on the end-users machines.
This EXE (which you ran the script on it) must be packaged and delivered to the end-users.
Related Topics: