Detecting DEP (Data Execution Prevention) Status

Got a problem you cannot solve? Try here.
Locked
H4nd0
Posts: 92
Joined: Thu Nov 09, 2006 8:16 am
Location: Sydney, AU
Contact:

Detecting DEP (Data Execution Prevention) Status

Post by H4nd0 »

Is there anyway to detect the status of DEP with IA? I want to be able to warn the user of the DEP status and either correct the DEP configuration or add our executables to the DEP exclusion list. More info here:

http://forums.firedaemon.com/viewtopic.php?t=55
SteveDude
Posts: 253
Joined: Wed Apr 11, 2007 6:07 pm

Another handy thing to know...

Post by SteveDude »

This would be another great addition to IA. Wouldn't mind knowing this one myself.
Tinus
Posts: 209
Joined: Tue Jun 20, 2006 8:42 am
Location: Germany

Post by Tinus »

I don't mind about the state of DEP. I simply add my exe to the exclusion list using a registry key like this:

Code: Select all

Write Registry Key HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Layers\\$TARGETDIR$\\<YourAppHere>.exe, DisableNXShowUI
If DEP is disabled and enabled later on, my app is in the exclusion list. If DEP is active you have to reboot to make it work.
My installer already needs to reboot, so this is no additional problem for my app.

This works (at least) on Windows XP and Server 2003.
Martin Rothschink

AxoNet Software GmbH
http://www.axonet.de/products/other-pro ... stallaware
SteveDude
Posts: 253
Joined: Wed Apr 11, 2007 6:07 pm

That works

Post by SteveDude »

Tinus,

Thanks for the trick. That's a start for a good workaround. It would still be nice to know if it is on so you could set the Reboot Flag in the install. Could be just another setting hidden somewhere.

SteveDude
H4nd0
Posts: 92
Joined: Thu Nov 09, 2006 8:16 am
Location: Sydney, AU
Contact:

Post by H4nd0 »

Thanks for the tip but it doesn't appear to work on Vista nor on x64 machines.
H4nd0
Posts: 92
Joined: Thu Nov 09, 2006 8:16 am
Location: Sydney, AU
Contact:

Post by H4nd0 »

I correct myself. It does appear to work but you have to flip the installer into 64-bit mode before you write the reg variables on an x64 box.
FireDaemon Technologies Limited
http://www.firedaemon.com
Locked