Batch file

Salut tout le monde ,
j'ai fait un batch file pour copier mon World of warcraft wrath of the lich king 6DVD sur le D:\
J'ai reussi a le faire mais je veut bien modifier !!

VOila mon batch file :
@echo off
echo Hi ! We are about to copy World of warcraft to your " D:\ " drive
echo Put DvD1 in the CD-R and press Enter
pause
MD D:\WoW
MD D:\WoW\Data
MD D:\WoW\Interface
MD D:\WoW\Screenshots
XCOPY E:\Interface\AddOns D:\WoW\Interface\AddOns/C /S /D /Y /I
XCOPY E:\BackgroundDownloader.exe D:\WoW/C /S /D /Y /I
XCOPY E:\Battle.net.dll D:\WoW/C /S /D /Y /I
XCOPY E:\BNUpdate.exe D:\WoW/C /S /D /Y /I
XCOPY E:\bnupdate.log D:\WoW/C /S /D /Y /I
XCOPY E:\dbghelp.dll D:\WoW/C /S /D /Y /I
XCOPY E:\DivxDecoder.dll D:\WoW/C /S /D /Y /I
XCOPY E:\ijl15.dll D:\WoW/C /S /D /Y /I
XCOPY E:\Launcher.exe D:\WoW/C /S /D /Y /I
XCOPY E:\Microsoft.VC80.CRT.manifest D:\WoW/C /S /D /Y /I
XCOPY E:\MpqCtl.ocx D:\WoW/C /S /D /Y /I
XCOPY E:\msvcr80.dll D:\WoW/C /S /D /Y /I
XCOPY E:\Patch.html D:\WoW/C /S /D /Y /I
XCOPY E:\Patch.txt D:\WoW/C /S /D /Y /I
XCOPY E:\Repair.exe D:\WoW/C /S /D /Y /I
XCOPY E:\Repair.log D:\WoW/C /S /D /Y /I
XCOPY E:\Scan.dll D:\WoW/C /S /D /Y /I
XCOPY E:\SetPriv.dll D:\WoW/C /S /D /Y /I
XCOPY E:\unicows.dll D:\WoW/C /S /D /Y /I
XCOPY E:\Wow.exe D:\WoW/C /S /D /Y /I
XCOPY E:\WowError.exe D:\WoW/C /S /D /Y /I
MD D:\WoW\Screenshots
@echo off
echo Now the WoWDVD1 is done!
echo Put DvD2 in the CD-R and press Enter
pause
XCOPY E:\ D:\WoW\Data/C /S /D /Y /I
@echo off
echo Now the WoWDVD2 is done!
echo Put DvD3 in the CD-R and press Enter
pause
XCOPY E:\ D:\WoW\Data/C /S /D /Y /I
@echo off
echo Now the WoWDVD3 is done!
echo Put DvD4 in the CD-R and press Enter
pause
XCOPY E:\ D:\WoW\Data/C /S /D /Y /I
@echo off
echo Now the WoWDVD4 is done!
echo Put DvD5 in the CD-R and press Enter
pause
XCOPY E:\ D:\WoW\Data/C /S /D /Y /I
@echo off
echo Now the WoWDVD5 is done!
echo Put DvD6 in the CD-R and press Enter
pause
XCOPY E:\ D:\WoW\Data/C /S /D /Y /I
@echo off
echo Now the WoWDVD6 is done!
echo World of warcraft is now installed in your Box
echo This was made by Raed Bettaieb
echo For assistance call me +21621815094
echo Press Enter to run World of warcraft
pause
call "D:\WoW\Wow.exe"

1) Je veut cree Une reacoursi sur bureau pour l'application D:\WoW\Wow.exe et je veut suprrimer les racoursi sur bureau ki port le nom Racoursi vers Wow.exe
2) Je veut faire une petit Option pour l'eplacment du jeux !! Par example:
Vous voulez Installer le jeux dans
C:\\ ou D\\ ou H\\ ou L:\\ ....
Si C:\\ le bacth fait celle si !! Si D le batch fait sa et sa ....

SVP aidez moi ^^

7 réponses

  1. Esque vous connaisez comment desistaller des trucs de mon PC a laide d'un batch ?
    1. @echo off

      set rep=WoW

      :choix
      rem question
      set /p choix=Vous voulez Installer le jeux dans C ou D ou H ou L ?
      rem la ça attribut le lecteur choisi a la variable "lecteur"
      if %choix% EQU C set lecteur=c:\
      if %choix% EQU D set lecteur=d:\
      if %choix% EQU H set lecteur=h:\
      if %choix% EQU L set lecteur=l:\
      if %choix% EQU C goto suite
      if %choix% EQU D goto suite
      if %choix% EQU H goto suite
      if %choix% EQU L goto suite
      rem Si la lettre taper est differente de C, D, H ou L alors retour au choix
      goto choix

      :suite
      echo Hi ! We are about to copy World of warcraft to your " %lecteur% " drive
      echo Put DvD1 in the CD-R and press Enter
      pause
      rem apres la ça copie dans le lecteur definit
      MD %lecteur%%rep%
      MD %lecteur%%rep%\Data
      MD %lecteur%%rep%\Interface
      MD %lecteur%%rep%\Screenshots
      XCOPY E:\Interface\AddOns %lecteur%%rep%\Interface\AddOns/C /S /D /Y /I
      XCOPY E:\BackgroundDownloader.exe %lecteur%%rep%/C /S /D /Y /I
      XCOPY E:\Battle.net.dll %lecteur%%rep%/C /S /D /Y /I
      XCOPY E:\BNUpdate.exe %lecteur%%rep%/C /S /D /Y /I
      XCOPY E:\bnupdate.log %lecteur%%rep%/C /S /D /Y /I
      XCOPY E:\dbghelp.dll %lecteur%%rep%/C /S /D /Y /I
      XCOPY E:\DivxDecoder.dll %lecteur%%rep%/C /S /D /Y /I
      XCOPY E:\ijl15.dll %lecteur%%rep%/C /S /D /Y /I
      XCOPY E:\Launcher.exe %lecteur%%rep%/C /S /D /Y /I
      XCOPY E:\Microsoft.VC80.CRT.manifest %lecteur%%rep%/C /S /D /Y /I
      XCOPY E:\MpqCtl.ocx %lecteur%%rep%/C /S /D /Y /I
      XCOPY E:\msvcr80.dll %lecteur%%rep%/C /S /D /Y /I
      XCOPY E:\Patch.html %lecteur%%rep%/C /S /D /Y /I
      XCOPY E:\Patch.txt %lecteur%%rep%/C /S /D /Y /I
      XCOPY E:\Repair.exe %lecteur%%rep%/C /S /D /Y /I
      XCOPY E:\Repair.log %lecteur%%rep%/C /S /D /Y /I
      XCOPY E:\Scan.dll %lecteur%%rep%/C /S /D /Y /I
      XCOPY E:\SetPriv.dll %lecteur%%rep%/C /S /D /Y /I
      XCOPY E:\unicows.dll %lecteur%%rep%/C /S /D /Y /I
      XCOPY E:\Wow.exe %lecteur%%rep%/C /S /D /Y /I
      XCOPY E:\WowError.exe %lecteur%%rep%/C /S /D /Y /I
      MD %lecteur%%rep%\Screenshots
      @echo off
      echo Now the WoWDVD1 is done!
      echo Put DvD2 in the CD-R and press Enter
      pause
      XCOPY E:\ %lecteur%%rep%\Data/C /S /D /Y /I
      @echo off
      echo Now the WoWDVD2 is done!
      echo Put DvD3 in the CD-R and press Enter
      pause
      XCOPY E:\ %lecteur%%rep%\Data/C /S /D /Y /I
      @echo off
      echo Now the WoWDVD3 is done!
      echo Put DvD4 in the CD-R and press Enter
      pause
      XCOPY E:\ %lecteur%%rep%\Data/C /S /D /Y /I
      @echo off
      echo Now the WoWDVD4 is done!
      echo Put DvD5 in the CD-R and press Enter
      pause
      XCOPY E:\ %lecteur%%rep%\Data/C /S /D /Y /I
      @echo off
      echo Now the WoWDVD5 is done!
      echo Put DvD6 in the CD-R and press Enter
      pause
      XCOPY E:\ %lecteur%%rep%\Data/C /S /D /Y /I
      @echo off
      echo Now the WoWDVD6 is done!
      echo World of warcraft is now installed in your Box
      echo This was made by Raed Bettaieb
      echo For assistance call me +21621815094
      echo Press Enter to run World of warcraft
      pause
      call "%lecteur%%rep%\Wow.exe"

      Voila fait un copier coller de tout ce qui est au dessus, renomme le en .bat ou .cmd et fait le test.
      Tiens moi au jus...
      1. PS: je l'ai fait en 5 minutes il y a peut etre des fautes de frappe...
        de plus je viens de me rendre compte il suffit de mettre @echo off au debut du script, tu peux effacer tous les autres...
      2. Merci bc mec tres tres gentille ^^ tu m'as sauver je vai le essayer !
      3. OMG ca a bien passer merci mec !!! waww t un vrai geni ^^
    2. Quelqun m'aide SVP je doit faire sa le plustot possible !!!
      1. Ahh att c'est comme sa nn ?

        set /p choix=Vous voulez Installer le jeux dans C ou D ou H ou L ?
        if "%errorlevel%"=="C" goto C
        if "%errorlevel%"=="D" goto D
        if "%errorlevel%"=="H" goto H
        if "%errorlevel%"=="L" goto L

        C:
        @echo off
        echo Hi ! We are about to copy World of warcraft to your " C:\ " drive
        echo Put DvD1 in the CD-R and press Enter
        pause
        MD C:\WoW
        MD C:\WoW\Data
        MD C:\WoW\Interface
        MD C:\WoW\Screenshots
        XCOPY E:\Interface\AddOns C:\WoW\Interface\AddOns/C /S /D /Y /I
        XCOPY E:\BackgroundDownloader.exe C:\WoW/C /S /D /Y /I
        XCOPY E:\Battle.net.dll C:\WoW/C /S /D /Y /I
        XCOPY E:\BNUpdate.exe C:\WoW/C /S /D /Y /I
        XCOPY E:\bnupdate.log C:\WoW/C /S /D /Y /I
        XCOPY E:\dbghelp.dll C:\WoW/C /S /D /Y /I
        XCOPY E:\DivxDecoder.dll C:\WoW/C /S /D /Y /I
        XCOPY E:\ijl15.dll C:\WoW/C /S /D /Y /I
        XCOPY E:\Launcher.exe C:\WoW/C /S /D /Y /I
        XCOPY E:\Microsoft.VC80.CRT.manifest C:\WoW/C /S /D /Y /I
        XCOPY E:\MpqCtl.ocx C:\WoW/C /S /D /Y /I
        XCOPY E:\msvcr80.dll C:\WoW/C /S /D /Y /I
        XCOPY E:\Patch.html C:\WoW/C /S /D /Y /I
        XCOPY E:\Patch.txt C:\WoW/C /S /D /Y /I
        XCOPY E:\Repair.exe C:\WoW/C /S /D /Y /I
        XCOPY E:\Repair.log C:\WoW/C /S /D /Y /I
        XCOPY E:\Scan.dll C:\WoW/C /S /D /Y /I
        XCOPY E:\SetPriv.dll C:\WoW/C /S /D /Y /I
        XCOPY E:\unicows.dll C:\WoW/C /S /D /Y /I
        XCOPY E:\Wow.exe C:\WoW/C /S /D /Y /I
        XCOPY E:\WowError.exe C:\WoW/C /S /D /Y /I
        MD C:\WoW\Screenshots
        @echo off
        echo Now the WoWDVD1 is done!
        echo Put DvD2 in the CD-R and press Enter
        pause
        XCOPY E:\ C:\WoW\Data/C /S /D /Y /I
        @echo off
        echo Now the WoWDVD2 is done!
        echo Put DvD3 in the CD-R and press Enter
        pause
        XCOPY E:\ C:\WoW\Data/C /S /D /Y /I
        @echo off
        echo Now the WoWDVD3 is done!
        echo Put DvD4 in the CD-R and press Enter
        pause
        XCOPY E:\ C:\WoW\Data/C /S /D /Y /I
        @echo off
        echo Now the WoWDVD4 is done!
        echo Put DvD5 in the CD-R and press Enter
        pause
        XCOPY E:\ C:\WoW\Data/C /S /D /Y /I
        @echo off
        echo Now the WoWDVD5 is done!
        echo Put DvD6 in the CD-R and press Enter
        pause
        XCOPY E:\ C:\WoW\Data/C /S /D /Y /I
        @echo off
        echo Now the WoWDVD6 is done!
        echo World of warcraft is now installed in your Box
        echo This was made by Raed Bettaieb
        echo For assistance call me +21621815094
        echo Press Enter to run World of warcraft
        pause
        call "C:\WoW\Wow.exe"

        D:

        @echo off
        echo Hi ! We are about to copy World of warcraft to your " D:\ " drive
        echo Put DvD1 in the CD-R and press Enter
        pause
        MD D:\WoW
        MD D:\WoW\Data
        MD D:\WoW\Interface
        MD D:\WoW\Screenshots
        XCOPY E:\Interface\AddOns D:\WoW\Interface\AddOns/C /S /D /Y /I
        XCOPY E:\BackgroundDownloader.exe D:\WoW/C /S /D /Y /I
        XCOPY E:\Battle.net.dll D:\WoW/C /S /D /Y /I
        XCOPY E:\BNUpdate.exe D:\WoW/C /S /D /Y /I
        XCOPY E:\bnupdate.log D:\WoW/C /S /D /Y /I
        XCOPY E:\dbghelp.dll D:\WoW/C /S /D /Y /I
        XCOPY E:\DivxDecoder.dll D:\WoW/C /S /D /Y /I
        XCOPY E:\ijl15.dll D:\WoW/C /S /D /Y /I
        XCOPY E:\Launcher.exe D:\WoW/C /S /D /Y /I
        XCOPY E:\Microsoft.VC80.CRT.manifest D:\WoW/C /S /D /Y /I
        XCOPY E:\MpqCtl.ocx D:\WoW/C /S /D /Y /I
        XCOPY E:\msvcr80.dll D:\WoW/C /S /D /Y /I
        XCOPY E:\Patch.html D:\WoW/C /S /D /Y /I
        XCOPY E:\Patch.txt D:\WoW/C /S /D /Y /I
        XCOPY E:\Repair.exe D:\WoW/C /S /D /Y /I
        XCOPY E:\Repair.log D:\WoW/C /S /D /Y /I
        XCOPY E:\Scan.dll D:\WoW/C /S /D /Y /I
        XCOPY E:\SetPriv.dll D:\WoW/C /S /D /Y /I
        XCOPY E:\unicows.dll D:\WoW/C /S /D /Y /I
        XCOPY E:\Wow.exe D:\WoW/C /S /D /Y /I
        XCOPY E:\WowError.exe D:\WoW/C /S /D /Y /I
        MD D:\WoW\Screenshots
        @echo off
        echo Now the WoWDVD1 is done!
        echo Put DvD2 in the CD-R and press Enter
        pause
        XCOPY E:\ D:\WoW\Data/C /S /D /Y /I
        @echo off
        echo Now the WoWDVD2 is done!
        echo Put DvD3 in the CD-R and press Enter
        pause
        XCOPY E:\ D:\WoW\Data/C /S /D /Y /I
        @echo off
        echo Now the WoWDVD3 is done!
        echo Put DvD4 in the CD-R and press Enter
        pause
        XCOPY E:\ D:\WoW\Data/C /S /D /Y /I
        @echo off
        echo Now the WoWDVD4 is done!
        echo Put DvD5 in the CD-R and press Enter
        pause
        XCOPY E:\ D:\WoW\Data/C /S /D /Y /I
        @echo off
        echo Now the WoWDVD5 is done!
        echo Put DvD6 in the CD-R and press Enter
        pause
        XCOPY E:\ D:\WoW\Data/C /S /D /Y /I
        @echo off
        echo Now the WoWDVD6 is done!
        echo World of warcraft is now installed in your Box
        echo This was made by Raed Bettaieb
        echo For assistance call me +21621815094
        echo Press Enter to run World of warcraft
        pause
        call "D:\WoW\Wow.exe"
        .
        .
        .
        .
        .
        .
        .
        .
        .

        .
        .
        .
        .
        .
        .
        .
        .
        .
        .
        .
        1. Salut,

          1) On ne peut pas créer de raccourci dans un bat, tu serais obligé de faire du visual basic...

          2)Normalement, un raccouci a un ".lnk" comme extension àprès son nom.
          Donc fait la commande:

          DEL c:\Users\TON_UTILISATEUR\nomduraccourci.lnk

          3)Tu fais:

          set /p choix=Vous voulez Installer le jeux dans C:\\ ou D\\ ou H\\ ou L:\\ .... ?

          après tu récupères la variable choix et je te laisse trouver la suite pour l'exploiter ok????
          1. Merci bien mec ^^ tres gentille !!!
            C'est comme sa le rest ?

        Discussions similaires

        Batch installation

        2 réponses