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

Error Codes

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

1932 WinExec Errors

Keywords:  1932 error level list errors WinExec Undefined   Lasterror

Question on 1932:WINEXEC: Undefined Error:

What could be causing this?
       1932:WINEXEC: Undefined Error 
       "Stop"	RUN("F:WIN31\hpint14r.pif",""] 

Answer:

Ummm...
  1. Missing \ after F: ?

  2. ] instead of ) at end of line ?

  3. Bad PIF file ? What happens when you double-click the PIF file?

Additional Info for older versions of WinBatch:

This error was a bug in older versions (5.X?) of WinBatch. For those versions, try the following workaround:


ErrorMode(@OFF)
Run("dosbat","params")
ErrorMode(@CANCEL)
Last=LastError()
if Last != 1932 then goto oops

...

:Oops

Message("Error on Run command",Last)
Exit

1932: "WinExec: The system cannot find the file specified"

Question:

I have a user who has been receiving a 1932: "WinExec: The system cannot find the file specified" error on the following line of code:
	Run(Login.Exe,"")
I have verified with the user that they do have the executable being run (as well as the necessary privileges to run it). In looking at your support documentation, I noticed that the same error code had a different message:
	1932: "WinExec: Undefined Error"
Was this an older version of the message I am receiving (I have version 97D 32-bit)? Or is my error returning an incorrect message somehow? What other problems would cause a 1932 error to be returned?

Answer:

In the newer version of WinBatch be have better error diagnostices for this sort of thing. But in any case a 1932 error means that we don;t think we were able to launch the program. Usually it means file not found. The next likely suspect is a NTFS or share permissions thing.

RunWithLogon 1932 WinExec Error

Question

For some reason (2001P) When I use run with logon on my PC (Win2k) I get error 1932 the account specified for this service is different than the account specified for the other service. It works fine on a few other win2k pcs I have tested just not mine. Odd....

Here is my line of code

RunWithLogon("\\wemart\croot\sdat.exe", "/silent", "", @NORMAL, @NOWAIT, runas_user, runas_domain, runas_pswd, 1)

Answer:

Let's see. RunWithLogon is a Windows API that works on conjunction with a service running on your Win2K/XP platform. Hmmm...On my XP machine the service is "Secondary Logon" and it runs under the "LocalSystem" account. The service is running by default. Maybe you have it disabled on your machine?

User Reply:

I didn't even notice my runas service wasnt running. It was set for something else, not local system account (I must have been testing something). Thanks.

RunWithLogon 1932 Error The System cannot find the path specified XP

Question

I have written several programs using runwithlogon(). When I run the .EXE from the network with a Windows 2000 machine they all run fine. I try running the same.EXE with the same logon , mappings and same way from my Windows XP machine and get the error
1932: Winexec: The System cannot find the path specified
This is the command line
RunWithLogon("F:\COMMON\isapps\grouprem.exe", "", "", @NORMAL, @WAIT, runas_user, runas_domain, runas_pswd,0)
I then tried
RunWithLogon("F:\COMMON\isapps\grouprem.exe", "", "F:\COMMON\isapps\", @NORMAL, @WAIT, runas_user, runas_domain, runas_pswd,0)
which produced 1932:Winexec: Function Failed:

I also tried

dirchange("F:\COMMON\isapps\")
tmppath=environment("path")
tmppath=strcat(tmppath,";F:\COMMON\isapps\")
environset("PATH",tmppath)
tmppath=environment("path")
isit=direxist(runpath)
message( "runpath",isit)
RunWithLogon("F:\COMMON\isapps\grouprem.exe", "", "F:\COMMON\isapps\", @NORMAL, @WAIT, runas_user, runas_domain, runas_pswd,3)
message came up with a 1 but I still got the error 1932:Winexec: Function Failed:

RunWithLogon("\\servername\sharename\COMMON\isapps\grouprem.exe", "", "F:\COMMON\isapps\", @NORMAL, @WAIT, runas_user, runas_domain, runas_pswd,0)
FAILED

I have verified that the user account that is being specified for RunWithLogon() actually has access to the file that RunWithLogon() is supposed to be executing.

I copied the files local and changed the program to call the EXEs from a local path and it runs great.

Why would this be so difficult to get working on XP when it works great with 2000.

I actually ran this program on 500 Windows 2000 macines with success and it failed on our 5 XP machines.

Answer

We may have tracked down the problem.

On Windows Server 2003 and Windows XP: RunwithLogon accesses the specified program (exe) in the security context of the target user (the user specified in RunwithLogon).

If the executable image is on a network and a network drive letter is specified in the path, the network drive letter is not available to the target user, as network drive letters can be assigned per logon. If a network drive letter is specified, this function will fail. If the executable image is on a network, use the UNC path.

Please try the following code:

RunWithLogon("\\servername\sharename\COMMON\isapps\grouprem.exe", "", "", @NORMAL, @WAIT, runas_user, runas_domain, runas_pswd,0)

Article ID:   W12949
Filename:   1932 WinExec Errors.txt
File Created: 2010:08:03:10:12:30
Last Updated: 2010:08:03:10:12:30