@echo off

rem ****************************************************
rem *** install PDGReader Professional               ***
rem ****************************************************

if not exist "%PROGRAMFILES%\PDGReader\nul" md "%PROGRAMFILES%\PDGReader"
copy /Y PDGReader.exe "%PROGRAMFILES%\PDGReader"
copy /Y pdgreader.INI "%PROGRAMFILES%\PDGReader"
copy /Y uninstall.bat "%PROGRAMFILES%\PDGReader"
copy /Y unrar.dll "%PROGRAMFILES%\PDGReader"

if not exist "%ALLUSERSPROFILE%\Start Menu\Programs\PDGReader\nul" md "%ALLUSERSPROFILE%\Start Menu\Programs\PDGReader"
copy /Y PDGReader.lnk "%ALLUSERSPROFILE%\Start Menu\Programs\PDGReader"
copy /Y uninstall.lnk "%ALLUSERSPROFILE%\Start Menu\Programs\PDGReader"

copy /Y PDGReader.lnk "%ALLUSERSPROFILE%\Desktop"

rem ****************************************************
rem *** set up PDGReader Professional                ***
rem ****************************************************

if exist "%WINDIR%\system32\pdg2.dll" copy /Y pdg2.dll "%WINDIR%\system32"
regsvr32.exe /s "%WINDIR%\system32\pdg2.dll"

rem ****************************************************
rem *** open done.html to indicate setup completed   ***
rem ****************************************************

explorer.exe ..\html\done.html

rem ****************************************************
rem *** end of the batch file install.bat            ***
rem ****************************************************