I think this is more a problem of copy and move.
To move startmenu entries I wrote a script which copies source to target and removes source.
Are you sure that the Link on the Desktop is really a lnk-file? Sometimes the shortcuts are registry-keys (like recycle bin or network)
You can try my script to move you startmenu-entries.
You need sleep.exe (or remove the line with this command).
You can call the script with move.cmd "Acronis" "Brenn und Festplatten Tools"
It searches in %USERPROFILE% AND %ALLUSERPROFILE% and creates the target-dir if necessary.
Al
@ECHO OFF
SETLOCAL ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION
IF EXIST "%SYSTEMDRIVE%\SetWPIEnv.cmd" CALL "%SYSTEMDRIVE%\SetWPIEnv.cmd"
SET SOURCE="%~1"
SET TARGET="%~2"
IF "%~3"=="" (
SET /A LOOPS=0
) ELSE (
SET /A LOOPS=%~3
)
IF NOT "%OVERWRITELOOPS%"=="" SET /A LOOPS=%OVERWRITELOOPS%
IF %SOURCE%=="" GOTO :HELP
IF %TARGET%=="" SET TARGET=!CD!
IF /I "%UNDOMOVE%"=="true" (
ECHO Tausche Quelle und Ziel um die Verschiebung rueckgaengig zu machen.
SET CHANGE=%SOURCE%
SET SOURCE=%TARGET%
SET TARGET=%CHANGE%
SET CHANGE=
)
IF %SOURCE%==%SOURCE:\=% (
CALL :WAIT "%ALLUSERSPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" "%USERPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%"
IF %TARGET%==%TARGET:\=% (
CALL :MOVE "%ALLUSERSPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" "%ALLUSERSPROFILE%\STARTM~1\Programme\%TARGET:~1,-1%"
) ELSE (
CALL :MOVE "%ALLUSERSPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" "%TARGET:~1,-1%"
)
IF %TARGET%==%TARGET:\=% (
CALL :MOVE "%USERPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" "%USERPROFILE%\STARTM~1\Programme\%TARGET:~1,-1%"
) ELSE (
CALL :MOVE "%USERPROFILE%\STARTM~1\Programme\%SOURCE:~1,-1%" "%TARGET:~1,-1%"
)
) ELSE (
CALL :WAIT %SOURCE%
CALL :MOVE %SOURCE% %TARGET%
)
GOTO :END
:WAIT
SET FOUND=false
:LOOP
FOR %%X IN (%*) DO (
IF EXIST "%%~X" SET FOUND=true
)
IF /I "%FOUND%"=="true" GOTO :NEXT
IF %LOOPS% LEQ 0 GOTO :NEXT
ECHO Warte bis Quelle existiert ^(%LOOPS%^)...
"%~dp0sleep.exe" 1
SET /A LOOPS-=1
GOTO :LOOP
:NEXT
IF %LOOPS% LEQ 0 (
CALL :ERRORMSG "Quelle existiert nicht."
GOTO :END
)
GOTO :EOF
:MOVE
SET SRC="%~1"
SET DEST="%~2"
IF NOT EXIST %SRC% GOTO :END
DIR /A:D %SRC% >NUL 2>NUL
IF %ERRORLEVEL%==1 (
SET ISFILE=TRUE
) ELSE (
SET ISFILE=FALSE
)
SET PARAMS=/V /I /F /G /H /R /Y
IF NOT EXIST %DEST% MD %DEST%
IF /I %ISFILE%==FALSE (
IF "%SRC:~-2,1%"=="\" SET SOURCE="%SRC:~1,-2%"
IF "%DEST:~-2,1%"=="\" SET TARGET="%DEST:~1,-2%"
FOR %%T IN (%SRC%) DO SET DEST="%DEST:~1,-1%\%%~nxT"
SET PARAMS=%PARAMS% /E
)
IF NOT EXIST %DEST% MD %DEST%
XCOPY %PARAMS% %SRC% %DEST%
IF NOT %ERRORLEVEL%==0 (
CALL :ERRORMSG "Es ist ein Fehler (ERRORLEVEL: %ERRORLEVEL%) aufgetreten."
GOTO :END
)
IF %ISFILE%==TRUE (
DEL /F /Q %SRC%
) ELSE (
RD /S /Q %SRC%
)
GOTO :END
:HELP
ECHO.Anwendung: %~nx0 source [target]
ECHO.
GOTO :END
:ERRORMSG
ECHO FEHLER: %~1
GOTO :EOF
:END
ENDLOCAL