WSH setdefaultprinter doesn't work. Why?
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
I have the following code:
IWshRuntimeLibrary.WshNetwork myWSHNet; myWSHNet=new IWshRuntimeLibrary.WshNetworkClass(); myWSHNet.AddWindowsPrinterConnection(@"\\ZEUS\HEAD013", "", ""); myWSHNet.SetDefaultPrinter(@"\\ZEUS\HEAD013");
I get the WSH Network object fine, and the new printer is created without any problems. What doesn't work is setting it to be the default printer. Anyone any ideas why?