@echo off 

reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "%~dp0TrueLore.ZBTool.Main.exe"  
IF errorlevel == 0 (  
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "%~dp0TrueLore.ZBTool.Main.exe" /f  
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "%~dp0TrueLore.ZBTool.Main.exe" -t  REG_SZ /d "HIGHDPIAWARE"  
) else (  
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "%~dp0TrueLore.ZBTool.Main.exe" -t  REG_SZ /d "HIGHDPIAWARE"  
)  

reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "%~dp0TrueLore.TBTool.Main.exe"  
IF errorlevel == 0 (  
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "%~dp0TrueLore.TBTool.Main.exe" /f  
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "%~dp0TrueLore.TBTool.Main.exe" -t  REG_SZ /d "HIGHDPIAWARE"  
) else (  
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "%~dp0TrueLore.TBTool.Main.exe" -t  REG_SZ /d "HIGHDPIAWARE"  
)  