Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Windows Default Printer
Message
 
À
01/09/2000 15:14:51
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00411791
Message ID:
00411963
Vues:
19
>Okay,
>
>But I still can't get the WSH SetDefaultPrinter() to accept the port name of the printer.

How are you checking? I've got three installed printers. One on the network, Adobe Acrobat on LPT1:, and Generic/Text Only on FILE:. The following works for me just fine:
oNet = CREATEOBJECT('WScript.Network')
oNet.SetDefaultPrinter(a_prn[1, 2]) && LPT1:
oNet.SetDefaultPrinter(a_prn[2, 2]) && Remote que
oNet.SetDefaultPrinter(a_prn[3, 2]) && FILE:
If you're checking from VFP, it's not going to reflect it until it's re-started. The Printers folder, however, will show the correct information.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform