Fichier Batch pratique (4 / 5 étapes)

Étape 4: Remplir les fonctions

Maintenant nous allons remplir eux ! Insérez le code ci-dessous sous le le dernier écho avec---

 :aboutecho This batch file was created by Kevin Tipker in June 2016echo and is free to use and modify on your own risk. Please be very echo carefull if you don't understand what you are doing echo. echo You can find more of my work in the link below. echo - 
 :Help echo * To run this bat file without any problems you need to be a Administratorecho and execute it as Administrator echo. echo 1. Generate Backup of Files (enter 7 to see information) echo - Check if there is a map called Backup in C:/ If not create it echo. echo 2. Check Network Connectivity echo - Make sure to use LAN echo. echo 4. Deletes Temporary Internet Files, History and Cookies echo - The history, cookies etc files are located in echo C:\Documents and Settings\username\Local Settings\Temporary Internet Files 
 :BackupInfo echo This process will make a backup of the following files:echo - My Documents echo - Favorites echo - Email and contacts (MS Outlook) echo - Backing up email and address book (Outlook Express) echo - Registry echo. echo * NOTE: There is a change that not everything will be backed up echo and that is because you maybe not have MS Oulook or Outlook Express 
 :CreateBackup :: variables::this has to be above the title rule (see image 5)set drive=C:\Backup set backupcmd=xcopy /s /c /d /e /h /i /r /yecho - Backing up My Documents...%backupcmd% "%USERPROFILE%\My Documents" "%drive%\My Documents"echo - Backing up Favorites... %backupcmd% "%USERPROFILE%\Favorites" "%drive%\Favorites"echo - Backing up email and address book (Outlook Express)... %backupcmd% "%USERPROFILE%\Application Data\Microsoft\Address Book" "%drive%\Address Book" %backupcmd% "%USERPROFILE%\Local Settings\Application Data\Identities" "%drive%\Outlook Express"echo - Backing up email and contacts (MS Outlook)... %backupcmd% "%USERPROFILE%\Local Settings\Application Data\Microsoft\Outlook" "%drive%\Outlook"echo - Backing up the Registry... if not exist "%drive%\Registry" mkdir "%drive%\Registry" if exist "%drive%\Registry\regbackup.reg" del "%drive%\Registry\regbackup.reg" regedit /e "%drive%\Registry\regbackup.reg"echo. echo Backup Complete! 
 :CheckNetworkConn ping -n 1 www.google.com >nul off IF NOT ERRORLEVEL 1 goto :SUCCESS IF ERRORLEVEL 1 goto :TRYAGAIN 
 :TRYAGAIN echo - Let me try a bit more, please wait... off ping -n 1 www.google.com >nul IF NOT ERRORLEVEL 1 goto :SUCCESS2 IF ERRORLEVEL 1 goto :TRYIP 
 :TRYIP echo - Checking DNS...echo - Lets try by IP address... off ping -n 1 216.239.37.99|find "Reply from " >NUL IF NOT ERRORLEVEL 1 goto :SUCCESSDNS IF ERRORLEVEL 1 goto :TRYROUTER 
 :TRYROUTER echo - Lets try pinging the router....ping -n 2 192.168.1.1|find "Reply from " >NUL IF NOT ERRORLEVEL 1 goto :ROUTERSUCCESS IF ERRORLEVEL 1 goto :NETDOWN 
 :ROUTERSUCCESS echo - It appears that you can reach the router, but internet is unreachable. 
 :NETDOWN echo - It appears that you having network issues, the router cannot be reached. 
 :SUCCESSDNS echo - It appears that you are having DNS issues. 
 :SUCCESS echo - You have an active Internet connection 
 :SUCCESS2 echo - You have an active internet connection but some packet loss was detected. 
 :FAILURE echo - You do not have an active Internet connection 
 :ShowServices echo - ActiveX Installer (AxInstSV)echo - BitLocker Drive Encryption Service echo - Printer Extensions and Notifications echo - Print Spooler echo - Optimize Drives echo - http service (for problems with localhost servers like XAMP) 
 :CloseSomeServices ::You can add diffrent services here just search them up on google net stop AxInstSVnet stop BDESVC net stop PrintNotify net stop Spooler net stop defragsvc net stop http 
 :DeleteCache ::This is not everything you can use there are some more that you can use to delete internet files from your pc echo - Starting process...RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8 RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2 RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1 echo - Done! 
 :GetComputerInfo REM set variablesset system= set manufacturer= set model= set serialnumber= set osname= set sp= setlocal ENABLEDELAYEDEXPANSION set "volume=C:" set totalMem= set availableMem= set usedMem=echo Getting data [Computer: %computername%]... echo Please Wait....REM Get Computer Name FOR /F "tokens=2 delims='='" %%A in ('wmic OS Get csname /value') do SET system=%%AREM Get Computer Manufacturer FOR /F "tokens=2 delims='='" %%A in ('wmic ComputerSystem Get Manufacturer /value') do SET manufacturer=%%AREM Get Computer Model FOR /F "tokens=2 delims='='" %%A in ('wmic ComputerSystem Get Model /value') do SET model=%%AREM Get Computer Serial Number FOR /F "tokens=2 delims='='" %%A in ('wmic Bios Get SerialNumber /value') do SET serialnumber=%%AREM Get Computer OS FOR /F "tokens=2 delims='='" %%A in ('wmic os get Name /value') do SET osname=%%A FOR /F "tokens=1 delims='|'" %%A in ("%osname%") do SET osname=%%AREM Get Computer OS SP FOR /F "tokens=2 delims='='" %%A in ('wmic os get ServicePackMajorVersion /value') do SET sp=%%AREM Get Memory FOR /F "tokens=4" %%a in ('systeminfo ^| findstr Physical') do if defined totalMem (set availableMem=%%a) else (set totalMem=%%a) set totalMem=%totalMem:,=% set availableMem=%availableMem:,=% set /a usedMem=totalMem-availableMemFOR /f "tokens=1*delims=:" %%i IN ('fsutil volume diskfree %volume%') DO ( SET "diskfree=!disktotal!" SET "disktotal=!diskavail!" SET "diskavail=%%j" ) FOR /f "tokens=1,2" %%i IN ("%disktotal% %diskavail%") DO SET "disktotal=%%i"& SET "diskavail=%%j"echo. echo ----------------------------------------------------------------- echo Computer Information echo ----------------------------------------------------------------- echo - System Name: %system% echo - Manufacturer: %manufacturer% echo - Model: %model% echo - Serial Number: %serialnumber% echo - Operating System: %osname% echo - C:\ Total: %disktotal:~0,-9% GB echo - C:\ Avail: %diskavail:~0,-9% GB echo - Total Memory: %totalMem% echo - Used Memory: %usedMem% echo - Computer Processor: %processor_architecture% echo - Service Pack: %sp% echo ----------------------------------------------------------------- 

Articles Liés

Party Time 2 et partie temps 3.5 (un exemple procédure pas à pas d’éditer un fichier batch)

Party Time 2 et partie temps 3.5 (un exemple procédure pas à pas d’éditer un fichier batch)

Hi there ! Ceci est mon premier Instructable, donc s'il vous plaît ne me critiquer trop mal dans les commentaires ! Pour bien comprendre ce Instructable, je dois vous donner un peu d'histoire à ce sujet. Avant j'étais en tant que membre et il suffit
Recherche de fichier Batch utile

Recherche de fichier Batch utile

Bonjour.Il s'agit de mon premier instructable. donc, si j'ai fait une erreur s'il vous plaît allez-y doucement sur moi.J'avais fait un chercheur de fichier de commandes simple, pour aider mon auto trouver les fichiers que j'ai besoin dans ma jungle d
Comment faire un simple mot de passe protégé fichier batch

Comment faire un simple mot de passe protégé fichier batch

Il s'agit d'un très simple passowrd protégé lot, permet de dire, j'ai eu un fichier batch qui ouvrirait un nouveau fichier texte (my_diary.txt), mais ne voulait pas les gens pour y accéder facilement, je voudrais un mot de passe. Il s'agit d'un moyen
Fichier batch : jeu de guerre

Fichier batch : jeu de guerre

Salut!Je suis I♥BatchFiles !J'ai télécharger un nouveau projet de fichier de lot de tous les autres jours. Prochain projet de fichier de lot aura lieu le 26/05/16.Comment utiliser ce code :Ouvrez le bloc-notes et collez le code ci-dessous.Cliquez sur
Mot de passe protégé fichier à l’aide de fichiers Batch

Mot de passe protégé fichier à l’aide de fichiers Batch

aujourd'hui, je va vous montrer comment faire un fichier protégé de mot de passe qui est créé et accessible à l'aide d'un fichier Batch (.bat). La méthode que je vais utiliser est très simple, mais malheureusement, il n'est pas infaillible. N'importe
Fichier batch pour planter un ordinateur

Fichier batch pour planter un ordinateur

cette fois j'ai va vous montrer comment créer un fichier batch pour planter un ordinateur.Cela a été publié à des fins éducatives seulement, je ne suis ne pas à lieu responcible pour tout usage inapproprié de ces informations ou les fichiers que je p
Comment faire un fichier batch

Comment faire un fichier batch

Comment faire un fichier de commandes de baseDevenir un mécènePatreon lien : patreon.com/AnasArkawiÉtape 1: Ouvrez notepadÉtape 2: Code !Code :horspause de couleur 4Ccommencer mettre en pauseEtape 3: Enregistrez en tant que fichier batchEtape 4: Ouvr
Comment créer un autopatcher pour windows xp à l’aide de fichiers batch

Comment créer un autopatcher pour windows xp à l’aide de fichiers batch

comment créer un autopatcher pour windows xp à l'aide de fichiers batchDescription uniquement, photos ne peuvent jamais exister:)Étape 1: Toutes les étapes énumérées ici parce que c'est dur à lire dans plusieurs pages1. créez un nouveau dossier sur v
Grande Computer Prank (fichier Batch)

Grande Computer Prank (fichier Batch)

Alright, mon premier instructable porte sur la façon de faire et de personnaliser votre propre blague informatique ! Il n'est vraiment pas difficile du tout et je l'ai fait tout en sachant seulement deux codes de lot. = DVous devriez avoir des connai
Verrouiller votre n’importe quel fichier/dossier sans logiciel (aide-fichier Batch)

Verrouiller votre n’importe quel fichier/dossier sans logiciel (aide-fichier Batch)

aimez notre Facebook Page pour plus de mises à jour : http://www.facebook.com/errorcode401Bonjour maintenant vous pouvez facilement bloquer votre fichier ou un dossier dans windows sans n'importe quel logiciel. J'ai créé un fichier batch pour cela. v
À l’aide de fichiers Batch pour faire un match amical à l’écran Ghost

À l’aide de fichiers Batch pour faire un match amical à l’écran Ghost

Bonjour ! Ce didacticiel vous apprend à fabriquer un petit fantôme lunatique sur votre écran à l'aide de la programmation de lot ! Amusez vous hanter votre ordinateur !Étape 1: 1. Ouvrez votre éditeur La première chose que nous devons faire pour comm
Comment faire un fichier batch à télécharger un autre fichier de commandes

Comment faire un fichier batch à télécharger un autre fichier de commandes

Désolé ce ne sont pas mes photos. Son im vraiment simple va vous montrer à faire un lot de fichiers qui vous donnera la possibilité d'ouvrir un lien, prêt. =)IL S'AGIT DE MON PREMIER INSTRUCTABLE !s'il vous plaît laissez aucun méchant ne commentaires
Fichiers batch

Fichiers batch

il s'agit de la création d'un fichier batch qui crée beaucoup de fichiers sur le Bureau des victimes.Étape 1: Étape 1 Goto Démarrer puis cliquez sur Exécuter et tapez notepadÉtape 2: Setp 2 type bloc-notes :hors: ACD % courant%echo > %random%.%random
Différentes couleurs dans des fichiers batch

Différentes couleurs dans des fichiers batch

tout le monde, avec l'aide de g-one, j'ai créé une fonction que vous pouvez installer dans votre dossier windows/system32 pour obtenir plus d'une couleur dans des fichiers batch.Copiez et collez le code suivant et enregistrez-le sous ncol.bat (c'est