Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows Default Printer
Message
 
To
01/09/2000 15:14:51
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00411791
Message ID:
00411963
Views:
20
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform