WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Printing Information

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Print Function Causing a 1932: WinExec: Undefined Error

Keywords:      1932: WinExec: Undefined Error

Question:

I used the print command as follows: print("hbsiout.prn",dirget(),@NORMAL,@WAIT) and got a error as follows:
        "1932: WinExec: Undefined Error"

Answer:

To use the print command, the PRN file needs to be associated with an application that knows how to print them. Apparently you do not have such an association.

I often do a:

        FileCopy("xxx.prn","LPT1",0)
or a:
        FileCopy("xxx.prn","\\server\prt4",0)
and it works for me.

Related Question:

I am using WB32 97D. The documentation says that @WAIT is not functional in "print" but I have not found a replacement for this paramater. Here is what I currently have:
        print("NAME.TXT",dirget(),@normal,@NOWAIT)
Here is the error message I get from Winexec:
        1932: Winexec: Undefined Error
What "print" command do I need to use?

Answer:

What program comes up if you double-click name.txt? Usually notepad should show up. Does it show up on your system, or another program, or nothing? If you right-click on the file name.txt, does "print" show up in the right click menu. What happens when you select it?

Print is trying to use the same mechanism as the right-click print. If you subsititued a different editor for txt files....maybe it does not support print.

As a workaround use:

        runwait("notepad.exe","/p name.txt")

Another Similar Question:

I'm using the following function:
	print ("c:\share\sql scripts\send_to_oracle1.sql", dirget (), @normal, @nowait) 
and getting the error 1932. I know the path\file is correct. Using Winbatch 32 98B, WIL version 2.5bbg

Other Winbatch users (different installations) can get this to work. What must I look for?

Answer:

On the Print Function, basically WinBatch passed the request off to windows which then looks up .sql in the HKEY_CLASSES_ROOT section of the registry to see what program claims to be able to print the file. That program is then launched to print the file.

Either your .sql setting have been damaged or overwritten or never installed.

If you right-click the SQL file and look at the TOP menu items (above the first horizontal line) and compare them with working installations your probably will see a difference.

In Explorer/View/Options/File Type you may be able to repair the damage by copying setting from a working installation. Or re-install the SQL stuff.


Article ID:   W13695
Filename:   Print Function and 1932 WinExec Undefined Error.txt
File Created: 1999:04:15:16:55:46
Last Updated: 1999:04:15:16:55:46