Trouble with Utility runwin (OpenInsight 32-Bit)
At 08 APR 2003 10:56:13PM S Botes wrote:
I am making use of a program that Bob Carten gave me some time ago. It is designed to copy just the data portions of one database to another. They are seperate applications. I build a dos batch file. Once it is built I execute it with the following commands.
batch_filename= 'Moveit.bat'
cmd=command /c ":batch_filename
call Utility("RUNWIN",cmd,-1)
The problem is that when I run this from my conversion program it doesn't move any data. It appears to be executing because the dos window opens and what looks like all of the commands stream through. However, when I go to use the data I find that it just hasn't been moved.
Now, this used to work. Changes since it worked are Windows XP and upgrade to 4.1.3. I couldn't tell you the last version of OI that it worked with. Of note, if I exit out of the conversion program and launch the batch file without doing anything it works perfectly.
Hmmmm, thought maybe the last block of data wasn't getting written or something of that sort. I had been using OSWrite, no file open or close, so I switched to OSBWrite being sure to issue the open and close. The results are the same.
Any ideas out there?
Perhaps someone can tell me how I can create a log file from the batch file. I can't figure out how to echo the executed command to a file for examination. Also, the window that is opened for the RUNWIN closes when the batch file reaches the end.
Please help I have lost most of my hair over this one.
At 08 APR 2003 11:39PM S Botes wrote:
Well, I found out what is causing my problem. This may also apply to some of the other posts I have seen about runwin and OI32,
The file that I am building is a batch file. When that window is opened and executed by the runwin command it is evidently opened without long file name support. There are NO spaces in my file names. The same batch file works when run from Windows XP. I was able to get this to work by manually changing the long file name to one that meets the short file name conventions.
No what I need, as this is a conversion program to be distributed with our software, is a way to get this to run in a window with long file name support.
I did see one post about registering revcomi.dll. Did that and it didn't help.
So Rev support…. take a look at this please and tell me how I can get runwin to execute the batch program in a window that support long file names.
At 09 APR 2003 12:42AM Pat McNerthney wrote:
How about running CMD instead of COMMAND? COMMAND is typically a 16-bit application which is probably the cause of the long file name non-support, whereas CMD is a full 32-bit application.
Pat
At 09 APR 2003 10:58AM S Botes wrote:
Thanks Pat that took care of it. Gad did I waste time on this one.
At 09 APR 2003 01:15PM S Botes wrote:
Seems that cmd won't work with all versions of windows. Looks like double quotes will be required for win98. No idea about 95 as of yet.