Etat du script: Fonctionnel
Présentation:
Le script:
'Migration imprimante
'Version 0.1 20080925 by Clockover
Set WshNetwork = WScript.CreateObject("WScript.Network")
'On énumère les différentes imprimantes sur le poste
Set oPrinters = WshNetwork.EnumPrinterConnections
'WScript.Echo "Suppression des anciennes imprimantes"
For i = 0 to oPrinters.Count - 1 Step 2
if oPrinters.Item(i+1) = "\\serveur\imprimante1" then
WshNetwork.RemovePrinterConnection "\\serveur\imprimante1", , TRUE
end if
if oPrinters.Item(i+1) = "\\serveur\imprimante2" then
WshNetwork.RemovePrinterConnection "\\serveur\imprimante2", , TRUE
end if
Next
'Wscript.Echo "Installation des nouvelles"
WshNetwork.AddWindowsPrinterConnection "\\serveur\new_imprimante1"
WshNetwork.AddWindowsPrinterConnection "\\serveur\new_imprimante2"
'Wscript.Echo "Définition de l'imprimante par défaut"
wshNetWork.SetDefaultPrinter "\\serveur\new_imprimante1"
TODO Liste:
-Vide
Historique:

Version 0.1 (2008/09/25)
-Création du script et mis en production avec succès.
Page générée en 0.005 secondes