@echo off
setlocal

REM Find .NET Path
FOR /F "tokens=2* delims=	 " %%A IN ('reg query "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client" /v InstallPath /reg:32') DO SET Netpath=%%B

REM Check Found
if "%NETPATH%"=="" (
	echo .NET InstallPath not found
	goto :EXIT
)

SET Action=%1
if "%Action%"=="" SET Action=install

REM Install/Uninstall
%NETPATH%\ngen.exe %Action% CantabileApp.dll
%NETPATH%\ngen.exe %Action% Cantabile.exe
%NETPATH%\ngen.exe %Action% GuiKit.dll
%NETPATH%\ngen.exe %Action% SkiaSharp.dll

:EXIT