Created
March 19, 2016 23:28
-
-
Save jamezrin/cbaad751c1af863124d6 to your computer and use it in GitHub Desktop.
Little script to fix the swing rendering issues with Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
title Java Swing Graphical Glitch Fixer | |
color 02 | |
:checkadmin | |
net file 1>nul 2>nul | |
if '%errorlevel%' == '0' ( | |
goto ask | |
) else ( | |
powershell "saps -filepath %0 -verb runas" >nul 2>&1 | |
) | |
exit /b | |
echo. | |
echo Little script to fix the swing rendering issues with Java | |
echo. | |
:ask | |
echo. | |
echo Operations: | |
echo 1) Apply the fix | |
echo 2) Revert the fix | |
echo 3) Exit | |
echo. | |
set /p response=Operation: %=% | |
cls | |
if '%response%' == '1' ( | |
setx /m J2D_D3D "false" | |
echo The fix has been applied, you can leave now | |
goto ask | |
) else if '%response%' == '2' ( | |
setx /m J2D_D3D "true" | |
echo The fix has been reverted, you can leave now | |
goto ask | |
) else if '%response%' == '3' ( | |
echo Exiting... | |
exit | |
) else ( | |
echo This is a unvalid operation... | |
goto ask | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment