Dear alt.comp.os.windows-11,
comp.windows.ms.programmer,
How do I disable this /Device Guard/ policy -- whatever that is -- so I
can run my self-made binaries unsigned? I am just a pleb, and do not
have a code signing key that I can just casually use every time I run
CL.exe to build my program.
My workaround so far has been
del myprogram.exe
nmake
which recreates the binary from the object files. This usually works,
but is not completely reliable, and I have had to delete the executable several times before the /Device Guard/ will allow it to run. I guess
this is something about stochastic uncertainty when MSVC optimizes or generates the instructions; but anyway, it's slightly annoying.
Is there a way to disable the /Device Guard/ policy, or something, in my source directory, such that it still applies to the /world at large/? I
do not wish to turn this otherwise quite useful security feature off completely.
Best wishes, and happy security policies!
On 10/30/2026 1:46 PM, Johann 'Myrkraverk' Oskarsson wrote:
Dear alt.comp.os.windows-11,
comp.windows.ms.programmer,
How do I disable this /Device Guard/ policy -- whatever that is -- so I
can run my self-made binaries unsigned? I am just a pleb, and do not
have a code signing key that I can just casually use every time I run
CL.exe to build my program.
My workaround so far has been
del myprogram.exe
nmake
which recreates the binary from the object files. This usually works,
but is not completely reliable, and I have had to delete the executable
several times before the /Device Guard/ will allow it to run. I guess
this is something about stochastic uncertainty when MSVC optimizes or
generates the instructions; but anyway, it's slightly annoying.
Is there a way to disable the /Device Guard/ policy, or something, in my
source directory, such that it still applies to the /world at large/? I
do not wish to turn this otherwise quite useful security feature off
completely.
Best wishes, and happy security policies!
I should add that, when I asked the insufferable know-it-all ChatGPT, it suggested several different ways, and made an off hand remark that some
of the workaround(s) it suggested wouldn't work. So it kind of contra- dicted itself, so here I am, on Usenet, and wondering if the experts of alt.comp.os.windows-11 and comp.windows.ms.programmer know how to do
this?
On Fri, 10/30/2026 1:49 AM, Johann 'Myrkraverk' Oskarsson wrote:
On 10/30/2026 1:46 PM, Johann 'Myrkraverk' Oskarsson wrote:
Dear alt.comp.os.windows-11,
comp.windows.ms.programmer,
How do I disable this /Device Guard/ policy -- whatever that is -- so I
can run my self-made binaries unsigned? I am just a pleb, and do not
have a code signing key that I can just casually use every time I run
CL.exe to build my program.
My workaround so far has been
del myprogram.exe
nmake
which recreates the binary from the object files. This usually works,
but is not completely reliable, and I have had to delete the executable
several times before the /Device Guard/ will allow it to run. I guess
this is something about stochastic uncertainty when MSVC optimizes or
generates the instructions; but anyway, it's slightly annoying.
Is there a way to disable the /Device Guard/ policy, or something, in my >>> source directory, such that it still applies to the /world at large/? I >>> do not wish to turn this otherwise quite useful security feature off
completely.
Best wishes, and happy security policies!
I should add that, when I asked the insufferable know-it-all ChatGPT, it
suggested several different ways, and made an off hand remark that some
of the workaround(s) it suggested wouldn't work. So it kind of contra-
dicted itself, so here I am, on Usenet, and wondering if the experts of
alt.comp.os.windows-11 and comp.windows.ms.programmer know how to do
this?
The evidence is, you're on Windows 11 Enterprise.
You're likely domain joined and there is a company
policy pushed out to individual computers.
It's important at times like this, to copy the error message exactly.
^^^^^^^^^^^^^^^^^^^^^
Here is why. This person isn't using WDAG, it was turned off for him,
yet Windows Defender was blowing these messages. There were multiple
lines of text, but one line in particular, which I have quoted,
is how he figured it out for himself.
https://community.spiceworks.com/t/your-organization-used-device-guard-to-block-this-app/948033
"Defender is 100% reporting ?AppControlCodeIntegrityPolicyBlocked? for these 3 machines"
MS Defender security portal
Remove App Restriction <=== would want to use this, to toggle it off
I could not see any indication that Device Guard (a policy portfolio) has
an Exclusion capability. Not like Windows Defender has an Exclusion folder capability. Device Guard is programmed by an IT person, to whitelist
a curated set of Enterprise applications you as a user are allowed to use. And because it's a whitelist, and they don't want anyone punching holes
in their fortress made of cardboard boxes, there is no Exclusion capability for that flavor of lockdown.
Your IT guy is your friend, not your enemy. At work, I had a local IT and
I had the Help Line. The local guy was great, he could perform miracles,
and that is a person you want to keep on your side :-) Approach your person with your problem, and they will "set you free", up to the limits
of corporate policy (whatever that is). Generally speaking, lockdown sucks, but it's there for a reason, and when you see just how careless your
fellow professionals are, it's easy to understand why the heavyweight
things are switched on.
There should be a canned configuration for a dev that your IT person
should be using with your seat. The IT person understands that you
make unique executables with never-seen-before hash values, which
tends to set off reputation based detections. It has nothing
to do with actual malware signatures. I have Cloud Delivered Protection switched off, so anything I compile with MinGW32 doesn't set anything off.
My Win11 Home does not have Device Guard (which would require programming
the curated list of acceptable applications). I have Real Time Protection switched on (which compares signatures of bad things, against my
new executable).
As for what the compiler is doing, the deterministic parts
of the output should not change. However, the header of your
executable, perhaps it has a date stamp, and some limited number
of bytes may change each time you Build the thing. Pop two instances
of the executable into HxD and do a compare, and see where the differences exist. Only a portion of the field might change, so you have to use
your imagination to guess where the left-hand end would be.
https://en.wikipedia.org/wiki/HxD
Paul
Dear alt.comp.os.windows-11,
comp.windows.ms.programmer,
How do I disable this /Device Guard/ policy -- whatever that is -- so I
can run my self-made binaries unsigned? I am just a pleb, and do not
have a code signing key that I can just casually use every time I run
CL.exe to build my program.
My workaround so far has been
del myprogram.exe
nmake
which recreates the binary from the object files. This usually works,
but is not completely reliable, and I have had to delete the executable several times before the /Device Guard/ will allow it to run. I guess
this is something about stochastic uncertainty when MSVC optimizes or generates the instructions; but anyway, it's slightly annoying.
Is there a way to disable the /Device Guard/ policy, or something, in my source directory, such that it still applies to the /world at large/? I
do not wish to turn this otherwise quite useful security feature off completely.
Best wishes, and happy security policies!
On 10/30/2026 1:46 AM, Johann 'Myrkraverk' Oskarsson wrote:
Dear alt.comp.os.windows-11,
comp.windows.ms.programmer,
How do I disable this /Device Guard/ policy -- whatever that is -- so I
can run my self-made binaries unsigned? I am just a pleb, and do not
have a code signing key that I can just casually use every time I run
CL.exe to build my program.
My workaround so far has been
del myprogram.exe
nmake
which recreates the binary from the object files. This usually works,
but is not completely reliable, and I have had to delete the executable
several times before the /Device Guard/ will allow it to run. I guess
this is something about stochastic uncertainty when MSVC optimizes or
generates the instructions; but anyway, it's slightly annoying.
Is there a way to disable the /Device Guard/ policy, or something, in my
source directory, such that it still applies to the /world at large/? I
do not wish to turn this otherwise quite useful security feature off
completely.
Best wishes, and happy security policies!
I saw you bought a tower PC. Being a tower if may have the Enterprise version of Windows 11 preinstalled. They is from a Google search:
"
Supported Windows Client Editions
Device Guard requires an enterprise-grade operating system. It is
supported on 64-bit versions of:
? Windows 11 (Enterprise, Education, and IoT Enterprise editions)
? Windows 10 (Enterprise, Education, and IoT Enterprise editions)
? Note: It is not supported on Windows Home editions, and has highly limited/restricted Virtualization-Based Security capabilities on
standard Pro editions unless upgrade"
So to truly remove it, if looks like you need to scrub the disk and
install the Home addition of Windows
On 10/30/2026 7:29 PM, knuttle wrote:
On 10/30/2026 1:46 AM, Johann 'Myrkraverk' Oskarsson wrote:
Dear alt.comp.os.windows-11,
comp.windows.ms.programmer,
How do I disable this /Device Guard/ policy -- whatever that is -- so I
can run my self-made binaries unsigned? I am just a pleb, and do not
have a code signing key that I can just casually use every time I run
CL.exe to build my program.
My workaround so far has been
del myprogram.exe
nmake
which recreates the binary from the object files. This usually works,
but is not completely reliable, and I have had to delete the executable
several times before the /Device Guard/ will allow it to run. I guess
this is something about stochastic uncertainty when MSVC optimizes or
generates the instructions; but anyway, it's slightly annoying.
Is there a way to disable the /Device Guard/ policy, or something, in my >>> source directory, such that it still applies to the /world at large/? I >>> do not wish to turn this otherwise quite useful security feature off
completely.
Best wishes, and happy security policies!
I saw you bought a tower PC. Being a tower if may have the Enterprise version of Windows 11 preinstalled. They is from a Google search:
"
Supported Windows Client Editions
Device Guard requires an enterprise-grade operating system. It is supported on 64-bit versions of:
? Windows 11 (Enterprise, Education, and IoT Enterprise editions)
? Windows 10 (Enterprise, Education, and IoT Enterprise editions)
? Note: It is not supported on Windows Home editions, and has highly limited/restricted Virtualization-Based Security capabilities on standard Pro editions unless upgrade"
So to truly remove it, if looks like you need to scrub the disk and install the Home addition of Windows
When I execute
Win+R winver
it tells me I have Windows 11 Pro. I have not yet recreated the problem
and put a screenshot on some social media, so let's take it slowly.
I hope I can manage that later today.
On Fri, 10/30/2026 7:40 AM, Johann 'Myrkraverk' Oskarsson wrote:
On 10/30/2026 7:29 PM, knuttle wrote:
On 10/30/2026 1:46 AM, Johann 'Myrkraverk' Oskarsson wrote:
Dear alt.comp.os.windows-11,
comp.windows.ms.programmer,
How do I disable this /Device Guard/ policy -- whatever that is -- so I >>>> can run my self-made binaries unsigned? I am just a pleb, and do not
have a code signing key that I can just casually use every time I run
CL.exe to build my program.
My workaround so far has been
del myprogram.exe
nmake
which recreates the binary from the object files. This usually works, >>>> but is not completely reliable, and I have had to delete the executable >>>> several times before the /Device Guard/ will allow it to run. I guess >>>> this is something about stochastic uncertainty when MSVC optimizes or
generates the instructions; but anyway, it's slightly annoying.
Is there a way to disable the /Device Guard/ policy, or something, in my >>>> source directory, such that it still applies to the /world at large/? I >>>> do not wish to turn this otherwise quite useful security feature off
completely.
Best wishes, and happy security policies!
I saw you bought a tower PC. Being a tower if may have the Enterprise version of Windows 11 preinstalled. They is from a Google search:
"
Supported Windows Client Editions
Device Guard requires an enterprise-grade operating system. It is supported on 64-bit versions of:
? Windows 11 (Enterprise, Education, and IoT Enterprise editions)
? Windows 10 (Enterprise, Education, and IoT Enterprise editions)
? Note: It is not supported on Windows Home editions, and has highly limited/restricted Virtualization-Based Security capabilities on standard Pro editions unless upgrade"
So to truly remove it, if looks like you need to scrub the disk and install the Home addition of Windows
When I execute
Win+R winver
it tells me I have Windows 11 Pro. I have not yet recreated the problem
and put a screenshot on some social media, so let's take it slowly.
I hope I can manage that later today.
Best Guess:
Windows Security (powder blue shield with yellow triangle bottom right) in the Task Bar overflow area.
Virus and Threat protection
Virus & Threat protection Settings ("Manage Settings" link)
Real-Time protection ON
Dev Drive protection ON (and likely in response to your enabling of "Developer Mode")
Cloud-delivered protection OFF (don't want new executables analyzed for reputation)
Automatic sample submission OFF (don't want new executables analyzed for reputation, on accidental signature match)
Tamper Protection ON
Controlled folder access OFF (a ransomware protection feature, apparently)
Exclusions (custom, you decide which folders should not be scanned by AV)
Generally, enable features that won't ruin a good time. Then see
if whatever-the-error-message-was, goes away. Some features, you
look at the profit and loss, and sometimes the price is too high.
While from a performance degradation perspective, Real-Time protection
should be OFF, we cannot afford to run that way really. So it stays ON
for now. On high I/O situations, your I/O can be reduced to as low
as 12% of normal by the AV (on a hard drive).
There was a period of time (six months?) where incorrect
assertions were made by Windows Defender, about what might
be considered to be my Dev Drive. Nothing I did improved
the situation, but I guess eventually a Patch Tuesday fixed it.
There is no visible problem today with that (warnings about
files for which there should NOT be warnings).
It's remotely possible the machine was Domain Joined by someone,
before you got it. You would have to review what state the
machine was in, when you got it. Did you log in the first
time on a profile "User" password "User" ? That could be
a sign it was played with, before you got it. You could
download a 26H2 DVD from Microsoft (google for that), make
a DVD or USB stick, and do a clean install of the OS. And then
things like password aging 45 days, should disappear. The only thing
you should watch for is:
[Admin terminal]
PS> manage-bde -? # Get the help for the program, while in Powershell
C:> manage-bde /? # Get the help for the program, while in Command Prompt shell
manage-bde -status # Check that none of your partitions have Bitlocker applied
That's to avoid surprises later, if data recovery is required.
You should not allow Bitlocker to be applied, unless you have
read up on best practice, such as preparing a recovery disc
that has the key on it. Encryption can be a write-once read-never
technology, if you did not prepare yourself before hand. And during
install, Windows has been known to encrypt C: . The encryption
can be reversed, even if it is half-ways done. It will undo itself
when you flip the switch for that (I've had to do this once here).
While Windows 11 Home might do this, Pro less likely, I want you
to know about the issue and understand what command checks for this.
I hate it, when people discover C: is encrypted, when we're in the
middle of trying to fix something.
Paul
Dear alt.comp.os.windows-11,
comp.windows.ms.programmer,
How do I disable this /Device Guard/ policy -- whatever that is -- so I
can run my self-made binaries unsigned? I am just a pleb, and do not
have a code signing key that I can just casually use every time I run
CL.exe to build my program.
Rt Click CL.exe, select Properties.
On 10/30/2026 3:35 PM, Paul wrote:
On Fri, 10/30/2026 1:49 AM, Johann 'Myrkraverk' Oskarsson wrote:
On 10/30/2026 1:46 PM, Johann 'Myrkraverk' Oskarsson wrote:
Dear alt.comp.os.windows-11,
comp.windows.ms.programmer,
How do I disable this /Device Guard/ policy -- whatever that is -- so I >>>> can run my self-made binaries unsigned? I am just a pleb, and do not
have a code signing key that I can just casually use every time I run
CL.exe to build my program.
My workaround so far has been
del myprogram.exe
nmake
which recreates the binary from the object files. This usually works, >>>> but is not completely reliable, and I have had to delete the executable >>>> several times before the /Device Guard/ will allow it to run. I guess >>>> this is something about stochastic uncertainty when MSVC optimizes or
generates the instructions; but anyway, it's slightly annoying.
Is there a way to disable the /Device Guard/ policy, or something,
in my
source directory, such that it still applies to the /world at
large/? I
do not wish to turn this otherwise quite useful security feature off
completely.
Best wishes, and happy security policies!
I should add that, when I asked the insufferable know-it-all ChatGPT, it >>> suggested several different ways, and made an off hand remark that some
of the workaround(s) it suggested wouldn't work. So it kind of contra-
dicted itself, so here I am, on Usenet, and wondering if the experts of
alt.comp.os.windows-11 and comp.windows.ms.programmer know how to do
this?
The evidence is, you're on Windows 11 Enterprise.
You're likely domain joined and there is a company
policy pushed out to individual computers.
It's important at times like this, to copy the error message exactly.
^^^^^^^^^^^^^^^^^^^^^
Here is why. This person isn't using WDAG, it was turned off for him,
yet Windows Defender was blowing these messages. There were multiple
lines of text, but one line in particular, which I have quoted,
is how he figured it out for himself.
https://community.spiceworks.com/t/your-organization-used-device-
guard-to-block-this-app/948033
"Defender is 100% reporting
?AppControlCodeIntegrityPolicyBlocked? for these 3 machines"
MS Defender security portal
Remove App Restriction <=== would want to use this,
to toggle it off
I could not see any indication that Device Guard (a policy portfolio) has
an Exclusion capability. Not like Windows Defender has an Exclusion
folder
capability. Device Guard is programmed by an IT person, to whitelist
a curated set of Enterprise applications you as a user are allowed to
use.
And because it's a whitelist, and they don't want anyone punching holes
in their fortress made of cardboard boxes, there is no Exclusion
capability
for that flavor of lockdown.
Your IT guy is your friend, not your enemy. At work, I had a local IT and
I had the Help Line. The local guy was great, he could perform miracles,
and that is a person you want to keep on your side :-) Approach your
person
with your problem, and they will "set you free", up to the limits
of corporate policy (whatever that is). Generally speaking, lockdown
sucks,
but it's there for a reason, and when you see just how careless your
fellow professionals are, it's easy to understand why the heavyweight
things are switched on.
There should be a canned configuration for a dev that your IT person
should be using with your seat. The IT person understands that you
make unique executables with never-seen-before hash values, which
tends to set off reputation based detections. It has nothing
to do with actual malware signatures. I have Cloud Delivered Protection
switched off, so anything I compile with MinGW32 doesn't set anything
off.
My Win11 Home does not have Device Guard (which would require programming
the curated list of acceptable applications). I have Real Time Protection
switched on (which compares signatures of bad things, against my
new executable).
As for what the compiler is doing, the deterministic parts
of the output should not change. However, the header of your
executable, perhaps it has a date stamp, and some limited number
of bytes may change each time you Build the thing. Pop two instances
of the executable into HxD and do a compare, and see where the
differences
exist. Only a portion of the field might change, so you have to use
your imagination to guess where the left-hand end would be.
https://en.wikipedia.org/wiki/HxD
Paul
Thank you for your detailed answer. Unfortunately, this is a single
white tower I have at home, and there is no /entrerprise/ domain I am connected to.
I mean, I certainly hope not. How would an enterprise domain control
my white tower at home?
Also, there is no I.T. person; there's only me.
I did not install this instance of Windows 11, it came from the store
where I bought the tower.
I hope this changes answer somewhat, but I will now endeavor to take a screenshot, and put on social media. Or something.
But it will not be immediately, as life has a set of challenges for me.
Best wishes, and happy Windows 11!
On 10/30/2026 5:42 PM, Johann 'Myrkraverk' Oskarsson wrote:
On 10/30/2026 3:35 PM, Paul wrote:
On Fri, 10/30/2026 1:49 AM, Johann 'Myrkraverk' Oskarsson wrote:
On 10/30/2026 1:46 PM, Johann 'Myrkraverk' Oskarsson wrote:
Dear alt.comp.os.windows-11,
comp.windows.ms.programmer,
How do I disable this /Device Guard/ policy -- whatever that is -- so I >>>>> can run my self-made binaries unsigned? I am just a pleb, and do not >>>>> have a code signing key that I can just casually use every time I run >>>>> CL.exe to build my program.
My workaround so far has been
del myprogram.exe
nmake
which recreates the binary from the object files. This usually works, >>>>> but is not completely reliable, and I have had to delete the executable >>>>> several times before the /Device Guard/ will allow it to run. I guess >>>>> this is something about stochastic uncertainty when MSVC optimizes or >>>>> generates the instructions; but anyway, it's slightly annoying.
Is there a way to disable the /Device Guard/ policy, or something, in my >>>>> source directory, such that it still applies to the /world at large/? I >>>>> do not wish to turn this otherwise quite useful security feature off >>>>> completely.
Best wishes, and happy security policies!
I should add that, when I asked the insufferable know-it-all ChatGPT, it >>>> suggested several different ways, and made an off hand remark that some >>>> of the workaround(s) it suggested wouldn't work. So it kind of contra- >>>> dicted itself, so here I am, on Usenet, and wondering if the experts of >>>> alt.comp.os.windows-11 and comp.windows.ms.programmer know how to do
this?
The evidence is, you're on Windows 11 Enterprise.
You're likely domain joined and there is a company
policy pushed out to individual computers.
It's important at times like this, to copy the error message exactly.
^^^^^^^^^^^^^^^^^^^^^
Here is why. This person isn't using WDAG, it was turned off for him,
yet Windows Defender was blowing these messages. There were multiple
lines of text, but one line in particular, which I have quoted,
is how he figured it out for himself.
https://community.spiceworks.com/t/your-organization-used-device- guard-to-block-this-app/948033
"Defender is 100% reporting ?AppControlCodeIntegrityPolicyBlocked? for these 3 machines"
MS Defender security portal
Remove App Restriction <=== would want to use this, to toggle it off
I could not see any indication that Device Guard (a policy portfolio) has >>> an Exclusion capability. Not like Windows Defender has an Exclusion folder >>> capability. Device Guard is programmed by an IT person, to whitelist
a curated set of Enterprise applications you as a user are allowed to use. >>> And because it's a whitelist, and they don't want anyone punching holes
in their fortress made of cardboard boxes, there is no Exclusion capability >>> for that flavor of lockdown.
Your IT guy is your friend, not your enemy. At work, I had a local IT and >>> I had the Help Line. The local guy was great, he could perform miracles, >>> and that is a person you want to keep on your side :-) Approach your person >>> with your problem, and they will "set you free", up to the limits
of corporate policy (whatever that is). Generally speaking, lockdown sucks, >>> but it's there for a reason, and when you see just how careless your
fellow professionals are, it's easy to understand why the heavyweight
things are switched on.
There should be a canned configuration for a dev that your IT person
should be using with your seat. The IT person understands that you
make unique executables with never-seen-before hash values, which
tends to set off reputation based detections. It has nothing
to do with actual malware signatures. I have Cloud Delivered Protection
switched off, so anything I compile with MinGW32 doesn't set anything off. >>> My Win11 Home does not have Device Guard (which would require programming >>> the curated list of acceptable applications). I have Real Time Protection >>> switched on (which compares signatures of bad things, against my
new executable).
As for what the compiler is doing, the deterministic parts
of the output should not change. However, the header of your
executable, perhaps it has a date stamp, and some limited number
of bytes may change each time you Build the thing. Pop two instances
of the executable into HxD and do a compare, and see where the differences >>> exist. Only a portion of the field might change, so you have to use
your imagination to guess where the left-hand end would be.
https://en.wikipedia.org/wiki/HxD
Paul
Thank you for your detailed answer. Unfortunately, this is a single
white tower I have at home, and there is no /entrerprise/ domain I am
connected to.
I mean, I certainly hope not. How would an enterprise domain control
my white tower at home?
Also, there is no I.T. person; there's only me.
I did not install this instance of Windows 11, it came from the store
where I bought the tower.
I hope this changes answer somewhat, but I will now endeavor to take a
screenshot, and put on social media. Or something.
But it will not be immediately, as life has a set of challenges for me.
Best wishes, and happy Windows 11!
Ok, so I was able to /replicate the problem/, but I was unable to get a screenshot of the offending notification, and I haven't gotten it back.
I did however get this output in my CMD window,
'C:\Src\Myproject\myproject.exe' was blocked by your organization's
Device Guard policy.
Contact your support person for more info.
And as I am my own support person, I don't know what to do about this,
nor how to change my device guard's policy. I would /like/ to keep this security setting on -- after all it blocks the Epic store installer --
so I have found definite use for it [1].
I'll add that I have /Bitdefender Total Security/ installed, and have attempted to set an exception for that directory, but that doesn't seem
to have changed anything. I suspect this is not something triggered by Bitdefender as that has its own notification settings.
I also looked in my ChatGPT transcript, and found this; I quote.
WDAC deliberately restricts path-based rules.
By default, the directory must be writable only by administrators.
Otherwise, Windows won't trust the path-based allow rule.
Don't disable this protection just to make the rule work. Doing so
could allow malware to be copied into the directory and executed.
So I believed it best to ask the wizards of alt.comp.os.windows-11 and comp.windows.ms.programmer, before attempting to create any /Windows
Defender Application Control/ rule or other.
I really don't want to have my working code directory /writable only by administrators/, because I don't think it's healthy for me to work in
such an environment.
Best wishes, and happy security policies!
[1] We can have a different argument about whether the Epic store should
be allowed to download and execute unsigned intermediate binaries.
On Sat, 10/31/2026 4:48 AM, Johann 'Myrkraverk' Oskarsson wrote:
On 10/30/2026 5:42 PM, Johann 'Myrkraverk' Oskarsson wrote:
On 10/30/2026 3:35 PM, Paul wrote:
On Fri, 10/30/2026 1:49 AM, Johann 'Myrkraverk' Oskarsson wrote:
On 10/30/2026 1:46 PM, Johann 'Myrkraverk' Oskarsson wrote:
Dear alt.comp.os.windows-11,
comp.windows.ms.programmer,
How do I disable this /Device Guard/ policy -- whatever that is -- so I >>>>>> can run my self-made binaries unsigned? I am just a pleb, and do not >>>>>> have a code signing key that I can just casually use every time I run >>>>>> CL.exe to build my program.
My workaround so far has been
del myprogram.exe
nmake
which recreates the binary from the object files. This usually works, >>>>>> but is not completely reliable, and I have had to delete the executable >>>>>> several times before the /Device Guard/ will allow it to run. I guess >>>>>> this is something about stochastic uncertainty when MSVC optimizes or >>>>>> generates the instructions; but anyway, it's slightly annoying.
Is there a way to disable the /Device Guard/ policy, or something, in my >>>>>> source directory, such that it still applies to the /world at large/? I >>>>>> do not wish to turn this otherwise quite useful security feature off >>>>>> completely.
Best wishes, and happy security policies!
I should add that, when I asked the insufferable know-it-all ChatGPT, it >>>>> suggested several different ways, and made an off hand remark that some >>>>> of the workaround(s) it suggested wouldn't work. So it kind of contra- >>>>> dicted itself, so here I am, on Usenet, and wondering if the experts of >>>>> alt.comp.os.windows-11 and comp.windows.ms.programmer know how to do >>>>> this?
The evidence is, you're on Windows 11 Enterprise.
You're likely domain joined and there is a company
policy pushed out to individual computers.
It's important at times like this, to copy the error message exactly.
^^^^^^^^^^^^^^^^^^^^^ >>>>
Here is why. This person isn't using WDAG, it was turned off for him,
yet Windows Defender was blowing these messages. There were multiple
lines of text, but one line in particular, which I have quoted,
is how he figured it out for himself.
https://community.spiceworks.com/t/your-organization-used-device- guard-to-block-this-app/948033
"Defender is 100% reporting ?AppControlCodeIntegrityPolicyBlocked? for these 3 machines"
MS Defender security portal
Remove App Restriction <=== would want to use this, to toggle it off
I could not see any indication that Device Guard (a policy portfolio) has >>>> an Exclusion capability. Not like Windows Defender has an Exclusion folder >>>> capability. Device Guard is programmed by an IT person, to whitelist
a curated set of Enterprise applications you as a user are allowed to use. >>>> And because it's a whitelist, and they don't want anyone punching holes >>>> in their fortress made of cardboard boxes, there is no Exclusion capability
for that flavor of lockdown.
Your IT guy is your friend, not your enemy. At work, I had a local IT and >>>> I had the Help Line. The local guy was great, he could perform miracles, >>>> and that is a person you want to keep on your side :-) Approach your person
with your problem, and they will "set you free", up to the limits
of corporate policy (whatever that is). Generally speaking, lockdown sucks,
but it's there for a reason, and when you see just how careless your
fellow professionals are, it's easy to understand why the heavyweight
things are switched on.
There should be a canned configuration for a dev that your IT person
should be using with your seat. The IT person understands that you
make unique executables with never-seen-before hash values, which
tends to set off reputation based detections. It has nothing
to do with actual malware signatures. I have Cloud Delivered Protection >>>> switched off, so anything I compile with MinGW32 doesn't set anything off. >>>> My Win11 Home does not have Device Guard (which would require programming >>>> the curated list of acceptable applications). I have Real Time Protection >>>> switched on (which compares signatures of bad things, against my
new executable).
As for what the compiler is doing, the deterministic parts
of the output should not change. However, the header of your
executable, perhaps it has a date stamp, and some limited number
of bytes may change each time you Build the thing. Pop two instances
of the executable into HxD and do a compare, and see where the differences >>>> exist. Only a portion of the field might change, so you have to use
your imagination to guess where the left-hand end would be.
https://en.wikipedia.org/wiki/HxD
Paul
Thank you for your detailed answer. Unfortunately, this is a single
white tower I have at home, and there is no /entrerprise/ domain I am
connected to.
I mean, I certainly hope not. How would an enterprise domain control
my white tower at home?
Also, there is no I.T. person; there's only me.
I did not install this instance of Windows 11, it came from the store
where I bought the tower.
I hope this changes answer somewhat, but I will now endeavor to take a
screenshot, and put on social media. Or something.
But it will not be immediately, as life has a set of challenges for me.
Best wishes, and happy Windows 11!
Ok, so I was able to /replicate the problem/, but I was unable to get a
screenshot of the offending notification, and I haven't gotten it back.
I did however get this output in my CMD window,
'C:\Src\Myproject\myproject.exe' was blocked by your organization's
Device Guard policy.
Contact your support person for more info.
And as I am my own support person, I don't know what to do about this,
nor how to change my device guard's policy. I would /like/ to keep this
security setting on -- after all it blocks the Epic store installer --
so I have found definite use for it [1].
I'll add that I have /Bitdefender Total Security/ installed, and have
attempted to set an exception for that directory, but that doesn't seem
to have changed anything. I suspect this is not something triggered by
Bitdefender as that has its own notification settings.
I also looked in my ChatGPT transcript, and found this; I quote.
WDAC deliberately restricts path-based rules.
By default, the directory must be writable only by administrators.
Otherwise, Windows won't trust the path-based allow rule.
Don't disable this protection just to make the rule work. Doing so
could allow malware to be copied into the directory and executed.
So I believed it best to ask the wizards of alt.comp.os.windows-11 and
comp.windows.ms.programmer, before attempting to create any /Windows
Defender Application Control/ rule or other.
I really don't want to have my working code directory /writable only by
administrators/, because I don't think it's healthy for me to work in
such an environment.
Best wishes, and happy security policies!
[1] We can have a different argument about whether the Epic store should
be allowed to download and execute unsigned intermediate binaries.
https://endpointweekly.com/blog/smart-app-control-vs-wdac-signing.html
[Picture] This is why I can make EXEs here and nothing even twitches... Mine is OFF.
https://imgur.com/a/Q8N2pFZ
https://postimg.cc/8JXPSPLN
https://i.postimg.cc/PJTL1Cxp/Smart-App-Control.gif
That is 25H2.
Reading articles like this, is not helpful.
https://www.pcworld.com/article/3263770/windows-11s-october-update-blocks-smart-app-control-heres-the-fix.html
In 26H2, we see suggestions like this.
"Smart App Control is now easier to use
Smart App Control blocks suspicious, unsigned apps. Previously, once disabled,
you sometimes had to reinstall the OS (clean install) to re-enable it. In 26H2,
the mechanism has been revamped, and it is now possible to toggle it on/off
without resetting the OS.
"
[And this applies, once they fix the mistake they made, as documented
in the PCWorld link. An Oct.4, 2026 update seems to have botched this. ]
Basically, you've picked the perfect time to be dealing with this :-/
In theory, 26H2 offers better control of it.
Paul
Thank you. I've now turned my /Smart App Control/ or whatever, off.
Rhetorical question: What were Microsoft thinking?
| Sysop: | Jacob Catayoc |
|---|---|
| Location: | Pasay City, Metro Manila, Philippines |
| Users: | 5 |
| Nodes: | 4 (0 / 4) |
| Uptime: | 498678:37:15 |
| Calls: | 212 |
| Calls today: | 3 |
| Files: | 912 |
| D/L today: |
31 files (22,593K bytes) |
| Messages: | 69,880 |