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:
00725896
Views:
10
>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,
Einar
Semper ubi sub ubi.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform