|line 1: you need to transpose to: IF EXIST XXX (|
line 2: like Derek said...
line 7: copy XXX has no destination, so it does nothing and generates error.
lines 9 etc.: might work, but relative paths are to be avoided, esp. for something like an "install". If your install script doesn't know where it is, it should just give up and abort.
last line is an abomination. never use "!" in var. names, and if testing a variable for null, use any other method than that: IF "%opt%"=="", or best: IF NOT DEFINED OPT. but note that the second method requires that the var NOT have percents! Also, always set var to undefined before a set /p:
set /p opt=:
If XXX Exist (
ECHO INSTALLING! PlEASE WAIT!
echo Please wait, Im creating a Short cut.
if %opt%==else goto !