Ok guys taking your code I thought I had a solution. (This is just a test to see if it works) But it doesnt seem to want to work... Any ideas? Help this n00b kixtart user ;p
Code:
break on
$dp=GetDefaultPrinterProperties
$printerport= "$dp.PortName"
? "Printer PortName: " + $dp.PortName
Function GetDefaultPrinterProperties()
dim $colprinters,$printer
$colprinters=GetObject("winmgmts:\\.\root\cimv2").ExecQuery("Select * From Win32_Printer Where Default = TRUE")
if @error
exit @error
endif
for each $printer in $colprinters
$GetDefaultPrinterProperties=$printer
next
endfunction
if $printerport = ("IP_192.168.4.39")
? "IP Port Exists"
else
? "IP Port Does not Exist"
endif
if $printerport = "LPT1:"
? "LPT1 Port Exists"
else
? "LPT1 Port Does not Exist"
endif
if $printerport = "DOT4_001"
? "USB Port Exists"
else
? "USB Port Does not Exist"
endif