Batch Robocopy Menu démarrer - Démarrage
Bonjour tout le monde,
J'ai un problème avec mon batch.
Dès l'ouverture de la sessions mon batch est lancé et la première étape passe sans problème mais la deuxième qui est de copié un raccourci dans le menu démarrer (au démarrage) ne fonctionne pas. Or, lorsque je lance le batch à partir d'une fenetre dos elle fonctionne très bien. Où est le problème ?
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
@echo off
SET src=ou se trouve les fichiers à copié
SET dest=C:\
SET bin1=verif.vbs
SET bin2=lancer_logiciel.vbs
IF NOT EXIST "%dest%\%bin1%" SET existe=0
IF NOT EXIST "%dest%\%bin2%" SET existe=0
ROBOCOPY %src% %dest% %bin1% %bin2% /R:5 /W:5
IF NOT EXIST "%userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\%bin1%.Lnk" SET existe=0
robocopy %src% "%userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup" %bin1%.Lnk /R:5 /W:5
IF %existe%==0 SHUTDOWN /f /r /t 15 /c "Reboot pour maintenance" |