Script dos:affiche les caractéristiques du pc
Fermé
al3iza
-
7 avril 2011 à 23:01
BeFaX Messages postés 14202 Date d'inscription mercredi 24 décembre 2008 Statut Contributeur Dernière intervention 6 août 2013 - 8 avril 2011 à 00:25
BeFaX Messages postés 14202 Date d'inscription mercredi 24 décembre 2008 Statut Contributeur Dernière intervention 6 août 2013 - 8 avril 2011 à 00:25
A voir également:
- Script dos:affiche les caractéristiques du pc
- Benchmark pc - Guide
- Ecran noir pc - Guide
- Reinitialiser pc - Guide
- Pc lent - Guide
- Télécharger musique gratuitement sur pc - Télécharger - Conversion & Extraction
1 réponse
BeFaX
Messages postés
14202
Date d'inscription
mercredi 24 décembre 2008
Statut
Contributeur
Dernière intervention
6 août 2013
3 843
8 avril 2011 à 00:25
8 avril 2011 à 00:25
Les variables par défaut ne contiennent pas réellement d'informations concernant le matériel, il faut extraire les données d'un fichier généré par DXDIAG.
En voici un créé par mes soins, inspire toi de ça :
En voici un créé par mes soins, inspire toi de ça :
dxdiag /t %temp%\dxdiag.txt
(echo.
echo ^|======================================================^|
echo ^| Résumé de l'ordinateur ^|
echo ^|======================================================^|
echo ^|)>boot.txt
for /f "tokens=1,2* delims=:" %%a in ('type %temp%\dxdiag.txt ^| find "System Manufacturer"') do echo ^| Carte mère : %%b >>boot.txt
for /f "tokens=1,2* delims=:" %%a in ('type %temp%\dxdiag.txt ^| find "System Model"') do echo ^| Modèle : %%b >>boot.txt
for /f "tokens=1,2,3* delims=:" %%a in ('type %temp%\dxdiag.txt ^| find "Processor"') do call :del %%b
for /f "tokens=1,2* delims=]" %%a in ('type 01.tmp') do (
echo ^| Processeur : %%a
echo ^| Modèle : %%b
)>>boot.txt
if exist 01.tmp del /F /Q 01.tmp >NUL
goto nextr
:del
set var=%*
set var=%var: =]%
echo %var%>01.tmp
goto :eof
:nextr
for /f "tokens=1,2* delims=:" %%a in ('type %temp%\dxdiag.txt ^| find " Memory"') do echo ^| Mémoire : %%b >>boot.txt
for /f "tokens=1,2* delims=:" %%a in ('type %temp%\dxdiag.txt ^| find "Machine name"') do echo ^| Nom PC : %%b >>boot.txt
for /f "tokens=1,2* delims=:" %%a in ('type %temp%\dxdiag.txt ^| find "DirectX Version"') do echo ^| DirectX : %%b >>boot.txt
echo ^|>>boot.txt
for /f "tokens=1,2* delims=:" %%a in ('type %temp%\dxdiag.txt ^| find "Card name"') do echo ^| Carte Graph.: %%b >>boot.txt
for /f "tokens=1,2* delims=:" %%a in ('type %temp%\dxdiag.txt ^| find "Display Memory"') do echo ^| Mém. Graph : %%b >>boot.txt
for /f "tokens=1,2* delims=:" %%a in ('type %temp%\dxdiag.txt ^| find "Monitor Model"') do echo ^| Ecran : %%b >>boot.txt
for /f "tokens=1,2* delims=:" %%a in ('type %temp%\dxdiag.txt ^| find "Driver Date/Size"') do echo ^| Drivers : %%b %%c >>boot.txt
start boot.txt
exit