Das zweite Setup wird zu früh ausgeführt. Warten Sie nicht, bis das erste Setup abgeschlossen ist

393
Riccardo La Marca

Dies ist mein Self-Extractor-Skript:

;Il commento che segue contiene dei comandi per lo script del modulo auto- estraente  Setup="uTorrent quick installer\Install.bat" Setup="%COMSPEC%" /c RD /s /q "uTorrent quick installer" 2> NUL Silent=1 

Der Inhalt dieser Batchdatei ist nicht relevant. Dies ist die Installationsdatei:

@echo off setlocal EnableExtensions DisableDelayedExpansion CD "uTorrent quick installer" :Inizio TASKLIST | FINDSTR uTorrent.exe > NUL 2> NUL IF %ERRORLEVEL%==0 ( cls echo Chiudere uTorrent per far partire l'installazione... timeout /t 1 /nobreak > NUL goto Inizio ) cls IF NOT DEFINED PROGRAMFILES(X86) (set "PROGRAMFILES(X86)=%PROGRAMFILES%") set MESSAGGIO1=0 set MESSAGGIO2=0 IF NOT EXIST "%USERPROFILE%\Desktop\Torrent da importare" (set MESSAGGIO1=1) IF EXIST "%APPDATA%\uTorrent\*.torrent" ( set MESSAGGIO2=1 XCOPY /q /y "%APPDATA%\uTorrent\*.torrent" "%USERPROFILE%\Desktop\Torrent da importare\" > NUL ) IF EXIST "%PROGRAMFILES(X86)%\uTorrent\*.torrent" ( set MESSAGGIO2=1 XCOPY /q /y "%PROGRAMFILES(X86)%\uTorrent\*.torrent" "%USERPROFILE%\Desktop\Torrent da importare\" > NUL ) DEL /q "%USERPROFILE%\Desktop\uTorrent.lnk" 2> NUL DEL /q "%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\uTorrent.lnk" 2> NUL syspin.exe "%APPDATA%\uTorrent\uTorrent.exe" c:5387 > NUL RD /s /q "%PROGRAMFILES(X86)%\uTorrent" 2> NUL RD /s /q "%APPDATA%\uTorrent" 2> NUL XCOPY /e /q /y uTorrent "%PROGRAMFILES(X86)%\uTorrent\" > NUL Shortcut.exe /f:"%USERPROFILE%\Desktop\uTorrent.lnk" /a:c /t:"%PROGRAMFILES(X86)%\uTorrent\uTorrent.exe" > NUL Shortcut.exe /f:"%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs/uTorrent.lnk" /a:c /t:"%PROGRAMFILES(X86)%\uTorrent\uTorrent.exe" > NUL syspin.exe "%PROGRAMFILES(X86)%\uTorrent\uTorrent.exe" c:5386 > NUL echo Applicazione installata. IF %MESSAGGIO2%==1 ( IF %MESSAGGIO1%==1 ( echo E' stata creata la cartella "Torrent da importare" sul Desktop. timeout /t 2 /nobreak > NUL ) ELSE ( echo E' stato aggiornato il contenuto della cartella sul Desktop "Torrent da importare". timeout /t 3 /nobreak > NUL ) ) timeout /t 2 /nobreak > NUL start "" "%PROGRAMFILES(X86)%\uTorrent\uTorrent.exe" endlocal 

(Diese Charge funktioniert perfekt).

1

1 Antwort auf die Frage

1
Riccardo La Marca

Ich bin es gelöst !!!

;Il commento che segue contiene dei comandi per lo script del modulo auto-estraente  Path="%TEMP%" Setup="uTorrent quick installer\Install.bat" Setup="%COMSPEC%" /c RD /s /q "uTorrent quick installer" 2> NUL Setup="%COMSPEC%" /c start "" "%PROGRAMFILES(X86)%\uTorrent\uTorrent.exe" SetupCode Silent=1 

Dies ist die Batchdatei:

@echo off setlocal EnableExtensions DisableDelayedExpansion CD "uTorrent quick installer" :Inizio TASKLIST | FINDSTR uTorrent.exe > NUL 2> NUL IF %ERRORLEVEL%==0 ( cls echo Chiudere uTorrent per far partire l'installazione... timeout /t 1 /nobreak > NUL goto Inizio ) cls IF NOT DEFINED PROGRAMFILES(X86) (set "PROGRAMFILES(X86)=%PROGRAMFILES%") set MESSAGGIO1=0 set MESSAGGIO2=0 IF NOT EXIST "%USERPROFILE%\Desktop\Torrent da importare" (set MESSAGGIO1=1) IF EXIST "%APPDATA%\uTorrent\*.torrent" ( set MESSAGGIO2=1 XCOPY /q /y "%APPDATA%\uTorrent\*.torrent" "%USERPROFILE%\Desktop\Torrent da importare\" > NUL ) IF EXIST "%PROGRAMFILES(X86)%\uTorrent\*.torrent" ( set MESSAGGIO2=1 XCOPY /q /y "%PROGRAMFILES(X86)%\uTorrent\*.torrent" "%USERPROFILE%\Desktop\Torrent da importare\" > NUL ) DEL /q "%USERPROFILE%\Desktop\uTorrent.lnk" 2> NUL DEL /q "%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\uTorrent.lnk" 2> NUL syspin.exe "%APPDATA%\uTorrent\uTorrent.exe" c:5387 > NUL RD /s /q "%PROGRAMFILES(X86)%\uTorrent" 2> NUL RD /s /q "%APPDATA%\uTorrent" 2> NUL XCOPY /e /q /y uTorrent "%PROGRAMFILES(X86)%\uTorrent\" > NUL Shortcut.exe /f:"%USERPROFILE%\Desktop\uTorrent.lnk" /a:c /t:"%PROGRAMFILES(X86)%\uTorrent\uTorrent.exe" > NUL Shortcut.exe /f:"%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs/uTorrent.lnk" /a:c /t:"%PROGRAMFILES(X86)%\uTorrent\uTorrent.exe" > NUL syspin.exe "%PROGRAMFILES(X86)%\uTorrent\uTorrent.exe" c:5386 > NUL echo Applicazione installata. IF %MESSAGGIO2%==1 ( IF %MESSAGGIO1%==1 ( echo E' stata creata la cartella "Torrent da importare" sul Desktop. timeout /t 2 /nobreak > NUL ) ELSE ( echo E' stato aggiornato il contenuto della cartella sul Desktop "Torrent da importare". timeout /t 3 /nobreak > NUL ) ) timeout /t 2 /nobreak > NUL endlocal