- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am not an expert user, but I have successfully run a program using RUNQQ. The syntax is result = RUNQQ (filename, commandline). Example result = RUNQQ('myprog', '-c -r'). In this case you just need to keep 'myprog' in the same directory as your DSW file. Hope this helps.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But have you tried just RUNQQ instead?
Environment variables, including PATH, set by SETENVQQ (or SetEnvirnomentVariable api)are local to a command shell process. When you call SYSTEMQQ, you spawn another instance of command shell, which -- I think -- does not inherit the environment from the launching process. RUNQQ should not have that effect.
However, one thing is puzzling me -- you appear to know the directory where the .exe in question resides. Why don't you just launch it with the full path string instead of fiddling with PATH? Or is PATH set by something else?
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'll try RUNQQ and see if that solves the problem.
I know where the program resides on my development machine, unfortunately I cannot guarantee it will be located in the same folder on the machines this is to be deployed on, indeed this may even vary with future versions of the third party software.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have made extensive tests, with specially written test programs, and have even reloaded Windows 2000 and downloaded all patches and the result is the same.
SYSTEM (and probably SYSTEMQQ), will not run any .exe excutables. It will run any systems command, any batch file until it hits an executable, and runs correctly any .com file I tried. One single exception: Wordstar.exe actually runs when called, which program has its own stack within the body of the program, I believe.
Suspicion falls on one Microsoft security patch number KB835732, since all persons reporting this failure of SYSTEM (and in other Fortran compilers!!) say this is the last thing they did. What the relation is I don't know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are two ways of executing DOS programs under Windows.
One is CMD.exe and the other command.exe.
They behave differently.
One can have its environment changed, the other not.
One remembers which directory it started in and returns to that directory after a batch file terminates; the other stays in the last directory set by CD directory.
Neither functions like DOS did, but both together have the same features, but not individually.
This is where the use of requesting the PATH is needed.
I find setting the path works in all systems.
.
I find that calling 16-bit DOS programs (.com or .exe type) or batch files or commands from the command line or from a DOS-compiled Fortran program using SPAWN for programs and SYSTEM for commands, works in all Windows versions 95,98,NT, 2000 and XP.
But calling the SAME programs, batch files commands and so on, from the SAME F77 program source, compiled under DVF with SPAWN replaced by SYSTEM or SYSTEMQQ, will NOT work for just the .exe type 16-bit DOS programs on Windows 2000. We do not have DVF on another other system type.
These 16-bit DOS programas are NOT games, but long-time commercial programs. We used dwbug to make a test programa and try all the mentioned uses of SYSTEM. The debudg program could even call itself, (an .exe file) but no other .exe files except Wordstar which seems to have an internal stack.
The error is number 255 (positive!!) and the message is "stack overflow" on the command line window opened.
By the way, the spell checker hates "com" as part of any word, anywhere!
.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Repeat; after updating Windows 2000 with security patches, many users worldwide have reported the same thing with respect to the use of SYSTEM. I am requesting copies from contacts and different Forums; They are coming in now.
Wordstar (WS.exe) is the ONLY 16-bit DOS program that executes if called by SYSTEM in our Windows 2000. 32-bit DVF-programs also seem to execute (I only tested the single working one I have). We reloaded Windows; no change.
When using SYSTEM from within a DVF-compiled program in updated Windows 2000 ONLY as far as I can test:-
What does NOT work is calling 16-bit type .exe DOS-compiled executables (ours compiled with MS V3.31, compiled dates 1985 to today), from a DVF compiled calling program. The failure is always "Stack overflow" and error code 255.
With Windoes 2000, all these 16-bit programs execute normally under DOS and under Windows (command line). All can be CALLED and executed using SPAWN in a 16 bit DOS-compiled program to call them, But not if called by SYSTEM in a DFV console program. So if the calling program is DOS compiled (SPAWN),the called programs run. If the calling program is compiled by DVF and uses SYSTEM or SYSTEMQQ, they DO NOT RUN (if they are .exe type executables).
What DOES work, is calling type .com executables, batch files and system commands. I can supply the test program.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1) SYSTEM as used, expects the called program to provide its own stack for loading, instead of the normal DOS loader. This reduces its available stack size a lot under windows environments, to the point where it might not even load..
2) The workaround is to use the linker to change the stack to 5000 (suggested); Use exe2mod.exe to find what stack is assigned and up it a LOT.
Then the modified DOS-compiled program will load and execute, called from a Windows compiled DFV program. The reverse is reported to not need any changes.
I can confirm that DVF-compiled programs can call DVF-compiled programa and DOS programs can call DOS-compiled programs started in a Console command Window.
I don't like it because not all DOS programs are available as object modules that can be modified at the link moment.
So no third-party software is going to work unless called directly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems SYSTEM is using the called modules own stack to complete the loading, whereas a DOS window loads the exectable withiut doing that (just an interpretation).
I used a modifed exemod.exe (stack extended) to first modify LIB.exe (I could updae my library on Windows 2000), and then all the executables we wanted to called in Windows 200 through another program by SYSTEM.
It works. I have only seen this problem in Windows 2000, not in XP and not in 95 and 98.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page