WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: allalevkov on March 31, 2014, 12:31:07 PM

Title: winExec on Server 2008
Post by: allalevkov on March 31, 2014, 12:31:07 PM
I have WinBatch program which uses RunShell to start SEcureFX transmission program.  It runs on server 2003 and Win XP fine. 
Unfortunately :), we upgrading to Win Server 2008 and Win 7.  The program runs fine, except WinExec does not work on either Win Server 2008 or Win 7: error 1932, WinExec failure.  I downloaded 2014 version, installed it on win 7 computer and re-compiled the program.  The same thing.  I feel there is something not right with Win 7/server 2008 setup.  Could anyone offer any insight into this? 
Thank you in advance,
Alla
Title: Re: winExec on Server 2008
Post by: Deana on March 31, 2014, 12:41:41 PM
You should inspect the RunShell statement in your script, that it is failing. Confirm the file paths passed are correct for the new windows platform. If you still are unable to resolve the issue.

Simply add DebugTrace(@on,"trace.txt") to the beginning of the script and inside any UDF, run it until the error or completion, then post the trace file here ( removing any private info ) if you need further assistance.
Title: Re: winExec on Server 2008
Post by: td on March 31, 2014, 01:21:05 PM
Because this is occurring in a compiled script on Win7/2008, it could be a UAC settings issue. Another common cause of problems involving Run* functions is WOW64 file redirection.  The DebugTrace output should reveal if either of these issues is the cause.
Title: Re: winExec on Server 2008
Post by: allalevkov on March 31, 2014, 02:31:31 PM
I think the latest suggestion is right, the command which you can see in the trace works fine from command prompt, it is saved in the log and could be easily pasted in cmd.

Attached is the trace file from the routine which uses RunShell.  To me it does not have any more info, than I could see using Debug(1) interactively.  Do you think including other options for the debugtrace would be usefull?  I'm not very familiar with these options, just read about them today.
thank you,
Alla
Title: Re: winExec on Server 2008
Post by: Deana on March 31, 2014, 03:09:00 PM
Unfortunately the trace is missing some vital information. Specifically the value of SFXdir at the beginning and the extended error information that is generally at the end of the trace file.

Could you provide the path defined in your SFXdir variable and the end of the trace file that contains the wwwbatch.ini information.


Title: Re: winExec on Server 2008
Post by: allalevkov on March 31, 2014, 03:17:50 PM
SFXdir variable is the dir where the BA-lbx session is saved and SecureFX is installed one level above:  "C:\Program Files (x86)\VanDyke Software\Clients"

The trace file was complete.  I used option 1, which option do you want me to use to get the data 'in the end?'  Sorry, do not have much experience with it.
thanks,
alla
Title: Re: winExec on Server 2008
Post by: td on March 31, 2014, 03:18:39 PM
The first thing you might want to try is to comment out the ErrorMode(@Off) line and then click the "More Error Info" button, if it is enabled in error message box display.

This should also cause the wwwbatch.ini file to be dumped to the trace file which may have relevant additional error information. 
Title: Re: winExec on Server 2008
Post by: allalevkov on March 31, 2014, 04:42:08 PM
The additional error info was "WinExec Error: the system cannot find the file specified", and I finally got it.  The issue was a different install of SecureFX on this particular machine, it was in separate parts, CRT and FX in different directories, and I needed to add one more level to the path, after that Scheduler started to work, what a relief!  As usual the problem was between the keyboard and the computer 

On a good side I learned a great deal about File Redirection, UAC and Debug Trace use.  Thank you very much for your help!   You are still the greatest software support on the web.
Alla