Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Install printer @ runtime
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00725827
Message ID:
00725927
Views:
13
>>Have you try AddPrinterConnection and RemovePrinterConnection of WScript.Network object.
>
>I am having trouble using the WScript.Network object.
>
>Here is my code:
>oWshNetwork = CreateObject("WScript.Network")
>owshnetwork.AddWindowsPrinterConnection("\\myServer\myPrinter")
>
>I also tried:
>oWshNetwork = CreateObject("WScript.Network")
>owshnetwork.AddPrinterConnection("ColorPrinter","\\myServer\myPrinter")
>
>(I am using VFP7 and W2K)
>
>I get a different error message for the two examples.
>
>If anyone could help me with some code samples or hints that would be great.
>
>Thanks,

Look at the series of articles that Ed Rauh and I wrote on the WSH. The network object article appeared in the December, 2000 issue of the VFUG newsletter. The articles, which began in September that year, are available on-line at the site (www.vfug.org).
>Einar
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform