i will like to ask if anyone can convert this simple vb script to c# :i im a beginner so it would be nice to have an example.
strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set objNewPort = objWMIService.Get _ ("Win32_TCPIPPrinterPort").SpawnInstance_ objNewPort.Name = "IP_10.10.10.113" objNewPort.Protocol = 1 objNewPort.HostAddress = "10.10.10.113" objNewPort.PortNumber = "9100" objNewPort.SNMPEnabled = False objNewPort.Put_ Set objPrinter = objWMIService.Get("Win32_Printer").SpawnInstance_ objPrinter.DriverName = "HP LaserJet 4000 Series PS" objPrinter.PortName = "IP_10.10.10.113" objPrinter.DeviceID = "FrontOffice" objPrinter.Network = True objPrinter.Put_
//Thanks :)
Loading
VulpesPosted Nov 13, 2012, 10:27 AM
// ...
jesperPosted Nov 13, 2012, 4:39 AM
VulpesPosted Nov 11, 2012, 4:13 PM
I can't promise that it will work but try this:
using System.Management;
// ....
jesperPosted Nov 9, 2012, 5:25 PM
Satyapriya NayakPosted Nov 9, 2012, 10:54 AM