@echo off

rem ----------------------------------------------------------------------
rem     Uninstall script for Instant Clipboard
rem
rem ----------------------------------------------------------------------



echo ----------------------------------------------------------
echo This is the uninstall script for Instant Clipboard
echo ----------------------------------------------------------

if not exist choice.com goto choicedoesnotexist
choice "Are you sure you'd like to uninstall the Instant Clipboard " /c:YN

if ERRORLEVEL 2 goto dontunistall
if ERRORLEVEL 1 goto uninstall

:dontunistall
        echo Exiting.
        goto end

:uninstall
	echo Shutting down Instant Clipboard if it is running.
        ic -kill
        echo Success

        echo Removing registry keys.
        ic -unreg
        echo Success
	del manual.doc
	del manual.txt
	del config.cfg
	del mfc42.dll
	del MSVCP60.DLL
	del msvcrt.dll
	del clipboard.dll
	del tutorial.txt
	del ic.exe
	del icAdmin.exe	

 	echo Instant Clipboard was successfully unistalled.
	echo You may now delete any remaining files.
	choice "To exit press " /C:X
	rem del choice.com
        goto end

:choicedoesnotexist
        echo ERROR! Cannot find the choice.com executable.
        goto end        

:end


@echo on