So this should be easy, but I can’t get it to execute in a bat or action language through BF. I’m trying change the compatibility mode all EXE files in a specific directory.
for %x in (“c:\progs*.exe”) do reg.exe Add “HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers” /v “%~fx” /d “WINXPSP3” /f
The first step would definitely be to get it working in batch first.
If this works from a command line, outside of a batch, the first thing that jumps out at me is that in a batch, the %x in the for statement has to be escaped, as in
for %%x in ("c:\progs*.exe") do reg.exe Add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "%~fx" /d "WINXPSP3" /f