WMIC: delete obsolete Brother printer from Windows, reverse slashes within DataFlex

Symtpom: cannot print to a shared printer from a custom DataFlex application.

Yes, DataFlex is very old.  It still works (April 2018).

This command line syntax works great to reveal all Windows printers and their share names (tested on Windows 10 64-bit):

wmic printer list brief

We had one Brother printer listed with a non-blank ShareName AND a PrinterState of 4.  Because the physical printer was long gone from the premises, it did NOT show itself in Windows Control Panel, Devices and Printer, listing of the printers.  However clearly it was still in the operating system and apparently causing some kind of conflict.

Deleting that specific one was easy once the right wmic syntax was found:

wmic printer where sharename="CL" delete

NB: a REBOOT of Windows was necessary.

After this, two things worked which previously had failed.

1. Copy printme.txt  \\compname\sharename   
where compname was the computer name and sharename was the sharename of a valid active Brother printer   (previously this led to a long timeout followed by a networking error message)

2. Printing in dataflex using its syntax, wihch reverses the slashes compared to what Windows usually does.


Example: 
Windows              \\compname\sharename
Dataflex              //compname/sharename


Comments

Blog27999 said…
Your Affiliate Profit Machine is waiting -

Plus, making money with it is as easy as 1..2..3!

Here is how it all works...

STEP 1. Tell the system which affiliate products the system will push
STEP 2. Add some PUSH button traffic (it ONLY takes 2 minutes)
STEP 3. Watch the system explode your list and sell your affiliate products all by itself!

Are you ready to make money automatically??

Check it out here

Popular Posts