Recently I had to set up a computer to manually open a till drawer without using an installed program and without printing a receipt.
I read several forums and info and finally put together the information to allow me to do this.
One of the biggest issues I noticed was people trying to send commands via COM ports to USB printers or LPT1 – there is a really simple way to actually fix this up.
In Windows it is actually possible to map LPT1 to a network share with the following command:
net use \\computername\sharename lpt1
Edit (3/4/2014) just realised the above command is wrong correct command below:
net use lpt1: \\computername\printersharename /persistent:yes
So the first step is, share your printer and make sure you know the share name. Find out the name of your computer (CTRL+Pause Break on your keyboard or Right Click Computer and goto Properties)
Once you know the two details the command is as above – net use lpt1: \\computername\printersharename
Once this is done, you can now send plain text print jobs via LPT1 but it will actually send it to your USB connected printer, or realistically any printer that you have set up the mapped connection to.
The next step is to get your till open codes for your printer. There is a comprehensive list of them here.
Once you have the till codes you then need to actually convert them to hexadecimal (hint: if you are using a calculator you need to do each number inidividually then put them together end result will be something like 1b700019fa or similar)
I then used the info from here that explains how to convert the code from hexadecimal to ASCII using Notepad++
Once you save that file, you are ready to send it to your printer and provided you have the correct codes it should open your cash drawer without printing a single line.
To send it to the printer, make a batch file in the same location as your text file that contains the open drawer codes and add this line to it:
Copy /b open.txt lpt1
Call it opendrawer.bat or something similar so you know what it is for. Now you can just double click this to open the drawer. All the above line does is sends the text file that you created earlier as a binary file to port lpt1 – which we conveniently have mapped to our POS printer earlier. When the printer receives this file its response is I got a drawer open code, send those voltrons out the DK port and open up that bad boy (technically it sends a 24V signal to a solenoid in the drawer that makes it open but I think the other description is easier to understand)
I ended up setting this up for a customer because VendHQ can not open the drawer without printing a small line of text (because of the way Vend prints it is practically impossible to support opening a drawer without printing something so don’t hold that against them)
If you want to make the opendrawer.bat file accessible from quick launch there is a trick to, create a shortcut to the batch file, then copy this (ctrl+c) then create a new shortcut (right click create new shortcut anywhere on the desktop) and paste in the location that you just copied. However, before clicking next make sure you add ‘explorer’ to the front of the line:
Click next, name the file what you want and you can now drag it to the quick launch bar (however it will have an explorer icon)
Hope this helps some people out there. Later I will upload my batch file and code file that I created to open the drawer on an Epson TM88V.