WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: jkjk12 on September 16, 2015, 08:26:49 AM

Title: compiled .exe will not run
Post by: jkjk12 on September 16, 2015, 08:26:49 AM
I have a script that works fine when I run it from within the WinBatch Studio.  But when I run the compiled .exe it fails with this error:

1932:  WinExec: Function Failed on like 2.
RunHide("C:\Temp\CareFusion\ChargeCapture\ChargeCapture_DesktopConfig.exe","")

We are running WinBatch 2014.  My script does use RoboScript and SendKey commands but I included the wwctl44i.zip in my compiled .exe     

How do I make this run as a compiled .exe?

Title: Re: compiled .exe will not run
Post by: td on September 16, 2015, 08:58:13 AM
Assuming you meant 'wwctl44i.dll' and not 'wwctl44i.zip', your problem could be  UAC related.   First try manifesting your compiled script as 'highestAvailable' or 'requiresAdmin'.   WinBatch Studio runs 'highestAvailable' whereas the compiler defaults to' asInvoker. ' 
Title: Re: compiled .exe will not run
Post by: jkjk12 on September 16, 2015, 09:16:22 AM
Yes, I meant the .DLL (not zip file).  and UAC is OFF on my machine.   Plus I'm running this as an Administrator.   Is there another .dll I need to include in my compiled .exe? 
Title: Re: compiled .exe will not run
Post by: jkjk12 on September 16, 2015, 09:45:42 AM
I created a new script and it has 1 line of code:

RunHide("C:\Temp\CareFusion\ChargeCapture\ChargeCapture_DesktopConfig.exe","")

When I compile this and run it I get the same error.   Yet, when I run this from the WinBatch Studio it works fine. 
When I did the compile I included 3 DLL's.    WWCTL44i.DLL, WWINT44i.DLL & WWWNT43i.DLL

When I installed WinBatch I did enter the correct license information into the Compiler.   

So why does this not work?

Title: Re: compiled .exe will not run
Post by: td on September 16, 2015, 10:56:10 AM
Which version of Windows are you using, which version of Windows are you running your compiled script on, what are your compiled script's manifest settings, and which version of WinBatch+Compiler are you using?  Depending on your answers to ALL of these questions and a few other details, 'running this as an Administrator' may be part of the problem.

Also, you only need to include extenders you actually use in a compiled script.
Title: Re: compiled .exe will not run
Post by: td on September 16, 2015, 11:02:13 AM
Assuming you have a relatively resent version of WinBatch+Compiler, if the 'More Error Info' button is enabled when the WinExec error is displayed, you should click on it.  It will contain either an system error number or error text.  This will tell you why the function failed.
Title: Re: compiled .exe will not run
Post by: jkjk12 on September 16, 2015, 12:43:15 PM
TD.....you are correct.    the More Info button told me I don't have enough rights.   Which is funny since I'm logged onto the workstation as a domain admin and the domain admins group is a member of the Local admins group.  But when I ran this "as administrator" it worked.

Title: Re: compiled .exe will not run
Post by: td on September 16, 2015, 12:53:36 PM
The following article explains manifests as they relate to WinBatch:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Vista+Manifests~In~WinBatch~Explained.txt
(http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Vista+Manifests~In~WinBatch~Explained.txt)
The bit at the bottom of the article mentions using the compiler's Settings button to set the manifest for your compiled scripts.