@echo off

NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' goto gotAdmin
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
:--------------------------------------

cd setupfiles
if exist "%SystemRoot%\SysWOW64" (
	copy /Y Wing32.dll "%SystemRoot%\SysWOW64"
) else (
	copy /Y Wing32.dll "%SystemRoot%\System32"
)
sdbinst PG.sdb
