Imprimante

CerberusAbaka Messages postés 30 Date d'inscription dimanche 22 mai 2005 Statut Membre Dernière intervention 19 mars 2009 - 27 mars 2006 à 14:11
CerberusAbaka Messages postés 30 Date d'inscription dimanche 22 mai 2005 Statut Membre Dernière intervention 19 mars 2009 - 27 mars 2006 à 15:43
Salut !

Es que quelqu’un sait installer une imprimante avec visual
basic sur win XP 64 ?




<!--[if !supportEmptyParas]-->




J’utilise :






Set wshnetwork = CreateObject("wscript.network")


<!--[endif]-->





wshnetwork.addwindowsPrinterConnection impr



Sa a valeur de défi j'ait rien trouvé nul part...



Merci d'avance..





<!--[if !supportEmptyParas]--> <!--[endif]-->




<!--[if !supportEmptyParas]--> <!--[endif]-->




<!--[if !supportEmptyParas]--> <!--[endif]-->




<!--[if !supportEmptyParas]--> <!--[endif]-->




<!--[if !supportEmptyParas]--> <!--[endif]-->

2 réponses

cs_JMO Messages postés 1854 Date d'inscription jeudi 23 mai 2002 Statut Membre Dernière intervention 24 juin 2018 27
27 mars 2006 à 14:43
Bonjour,

Set WshNetwork = WScript.CreateObject("WScript.Network")
PrinterPath = "\\printserv\DefaultPrinter"
WshNetwork.
 AddWindowsPrinterConnection 
PrinterPath
'''''''''
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set oDrives = WshNetwork.EnumNetworkDrives
Set oPrinters = WshNetwork.EnumPrinterConnections
'"Mappages de lecteurs réseau :"
For i = 0 to oDrives.Count - 1 Step 2 drive vbCrLf& "Lecteur " & oDrives.Item(i) & " " & oDrives.Item(i+1) & drive &vbCrLf
Next


'"Mappages d'imprimantes réseau :"
For i = 0 to oPrinters.Count - 1 Step 2 imprim vbCrLf & "Port " & oPrinters.Item(i) & " " & oPrinters.Item(i+1) & imprim &vbCrLf
Next
MsgBox drive &vbCrLf&vbCrLf& imprim

'''''''''''''
Set WshNetwork = WScript.CreateObject("WScript.Network")
PrinterPath = "\\research\library1"
WshNetwork.AddWindowsPrinterConnection PrinterPath
WshNetwork.
 SetDefaultPrinter 
PrinterPath
'''''''''''''''''
Set WshNetwork = WScript.CreateObject("WScript.Network")
PrinterPath = "\\printserv\DefaultPrinter"
WshNetwork.
RemovePrinterConnection 
PrinterPath, true, true
'''''''''''''''


[mk:@MSITStore:E:\ScriptsVBS\SCRIPT56.CHM::/html/wsobjwshnetwork.htm WshNetwork, objet] | [mk:@MSITStore:E:\ScriptsVBS\SCRIPT56.CHM::/html/wsmthaddwindowsprinterconnection.htm AddWindowsPrinterConnection, méthode] | [mk:@MSITStore:E:\ScriptsVBS\SCRIPT56.CHM::/html/wsmthenumprinterconnections.htm EnumPrinterConnections, méthode] | [mk:@MSITStore:E:\ScriptsVBS\SCRIPT56.CHM::/html/wsmthremoveprinterconnection.htm RemovePrinterConnection, méthode] | [mk:@MSITStore:E:\ScriptsVBS\SCRIPT56.CHM::/html/wsmthsetdefaultprinter.htm SetDefaultPrinter, méthode]

<!--Footer Start-->

jean-marc
0
CerberusAbaka Messages postés 30 Date d'inscription dimanche 22 mai 2005 Statut Membre Dernière intervention 19 mars 2009
27 mars 2006 à 15:43
Ok j'essaye dés que je peut, Tu as win xp64?
Pas trop de probleme de compabilité?
0
Rejoignez-nous