echo %CD%
pushd EDGE

@copy EDGE.lnk "%USERPROFILE%\Desktop\EDGE.lnk"

@copy EDGE.lnk "%USERPROFILE%\Start Menu\Programs\EDGE.lnk"

@setlocal
@REM guarantee we can find reg.exe by adding some defaults to PATH
@set PATH=%PATH%:%SystemDrive%\WINNT;%SystemDrive%\WINNT\System32;%SystemDrive%\WINDOWS;%SystemDrive%\WINDOWS\system32;C:\WINNT;C:\WINDOWS;C:\WINNT\system32;C:\WINDOWS\system32
REG.exe QUERY HKLM\Software\R-core\R /v InstallPath > gawk\edge.tmp
@endlocal

echo setlocal > edge.bat
echo set EDGE_DATA=%%1 >> edge.bat
echo set EDGE_COV=%%2 >> edge.bat
gawk\bin\gawk -f gawk\edge.gawk gawk\edge.tmp >> edge.bat

echo endlocal >> edge.bat

@REM Open the README for the Excel add-in
explorer excel\README.html

popd
