Précédent   Forum du club des développeurs et IT Pro > Général Développement > Programmation système
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse
 
Outils de la discussion
Publicité
'
Vieux 28/12/2011, 12h20   #1
Jdauphin
Invité de passage
 
Homme Jeremy Dauphin
Administrateur systèmes et réseaux
Inscription : décembre 2011
Messages : 1
Détails du profil
Informations personnelles :
Nom : Homme Jeremy Dauphin
Localisation : Belgique

Informations professionnelles :
Activité : Administrateur systèmes et réseaux
Secteur : High Tech - Matériel informatique

Informations forums :
Inscription : décembre 2011
Messages : 1
Points : 0
Points : 0
Par défaut Probleme fichier Batch

Bonjour,

Je me permet de vous contacter car j'ai un soucis avec un dévelopement batch.

Ce script est pour l'installation d'imprimante en local sur chacun des pcs de mes clients. Le problème est que sous un pc seven aucun soucis ça fonctionne mais sous xp je n'arrive pas à le faire fonctionner.

Je vous envoie le code.

D'avance merci de vos réponses.

@echo off
cls

echo *************** Analyse de l'architecture du CPU ******************

Set RegQry=HKLM\Hardware\Description\System\CentralProcessor\0
@echo off
REG.exe Query %RegQry% > checkOS.txt

Find /i "x86" < CheckOS.txt > StringCheck.txt

If %ERRORLEVEL% == 0 (
set $ARCHITECTURE=86
) ELSE (
set $ARCHITECTURE=64
)

echo *************** Fingerprint de l'operating system ******************

ver | find /i "version 6.1." > nul
if %errorlevel%==0 set $VERSIONWINDOWS=SEVEN
ver | find /i "version 6.0." > nul
if %errorlevel%==0 set $VERSIONWINDOWS=VISTA
ver | find /i "version 5.1." > nul
if %errorlevel%==0 set $VERSIONWINDOWS=XP
ver | find /i "version 5.2." > nul
if %errorlevel%==0 set $VERSIONWINDOWS=2003
ver | find /i "Windows 2000" > nul
if %errorlevel%==0 set $VERSIONWINDOWS=2000

IF %$VERSIONWINDOWS%==2000 (
set $ARCHITECTURE=86
)


echo *************** Montage du Share de drivers ******************

net use I: "\\172.16.6.15\Applications" /USER:Administrator Caravelle55pwd

echo ************** Redémarrage du service d'impression *****************

net stop spooler
net start spooler

echo *************** Creation des ports réseau *****************

start /wait regedit.exe /s portBruxelles.reg

echo *************** Installation de l'imprimante SD_ADM *****************
IF %$ARCHITECTURE%==86 (
IF %$VERSIONWINDOWS%== SEVEN (
echo "Windows SEVEN x32 Xerox Phaser 6180MFP-N"
rundll32 printui.dll,PrintUIEntry /if /b "SD_ADM" /f "I:\Drivers\Inprimantes_Utilisateurs\SD_ADM\%$ARCHITECTURE%\%$VERSIONWINDOWS%\xrxgbzi.inf" /r "IP_SD_ADM" /m "Xerox Phaser 6180MFP-N PCL 6"
) ELSE (
echo "Windows XP/VISTA x32 Xerox Phaser 6180MFP-N"
rundll32 printui.dll,PrintUIEntry /if /b "SD_ADM" /f "I:\Drivers\Inprimantes_Utilisateurs\SD_ADM\%$ARCHITECTURE%\%$VERSIONWINDOWS%\xrxgbzi.inf" /r "IP_SD_ADM" /m "Xerox Phaser 6180MFP-N PCL 6"
)
) ELSE (
IF %$ARCHITECTURE%==64 (
IF %$VERSIONWINDOWS%== SEVEN (
echo "Windows SEVEN x64 Xerox Phaser 6180MFP-N"
rundll32 printui.dll,PrintUIEntry /if /b "SD_ADM" /f "I:\Drivers\Inprimantes_Utilisateurs\SD_ADM\%$ARCHITECTURE%\%$VERSIONWINDOWS%\xrxgbzi.inf" /r "IP_SD_ADM" /m "Xerox Phaser 6180MFP-N PCL 6"
) ELSE (
echo "Windows XP/VISTA x64 Xerox Phaser 6180MFP-N"
rundll32 printui.dll,PrintUIEntry /if /b "SD_ADM" /f "I:\Drivers\Inprimantes_Utilisateurs\SD_ADM\%$ARCHITECTURE%\%$VERSIONWINDOWS%\xrxgbzi.inf" /r "IP_SD_ADM" /m "Xerox Phaser 6180MFP-N PCL 6"
)
)
)
)
echo *************** Paramètrage des imprimantes *****************

C:\Bruxelles\scBxlSetParam.bat

echo ************** Demontage du share réseau des drivers ****************

net use I: /delete /yes
Jdauphin est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse
Outils de la discussion

Navigation rapide


Fuseau horaire GMT +2. Il est actuellement 08h07.


 
 
 
 
Partenaires

Hébergement Web