npocmaka / batch.scripts

batch script utils and examples by npocmaka -
https://www.linkedin.com/in/npocmaka/
MIT License
1.08k stars 873 forks source link

Why is the __COMPAT_LAYER variable defined? #43

Closed sebetci closed 2 years ago

sebetci commented 2 years ago

__COMPAT_LAYER is defined as environment variable on Windows 10 Pro and its value is RunAsInvoker.

C:\> ECHO %__COMPAT_LAYER%
RunAsInvoker

Why is the __COMPAT_LAYER variable defined in this script? Which Windows OS is targeted to the following definition?

https://github.com/npocmaka/batch.scripts/blob/ff1679b90c8e24efd930a24abeda83ec22a564ae/Java/javaDetect.bat#L3

sebetci commented 2 years ago

I found out why you are assigning this variable (__COMPAT_LAYER). That's why I'm closing the issue.

__COMPAT_LAYER is a system environment variable that allows you to set compatibility layers, which are the settings you can adjust when you right-click on an executable, select Properties, and go to the Compatibility tab.

Resources