Fox 2.6 Closing inactive foxpro run command window
Fox 2.6 Closing inactive foxpro run command window
(OP)
Hi Experts,
It's been a while since my last post but have several coming your way...
I have recently installed Fox 2.6 on a windows 10 32bit virtual machine.
in my new environment, I seemed to have a lost a setting where an inactive FoxPro Run Command screen would close automatically. Now I have to click the X in the upper right or click the upper left corner to open a menu window and select close to manually close the window. In this particular sequence, I have to do that twice as it involves deleting files and executing a zip of files, 2 separate dos commands.
thoughts appreciated
Joe
It's been a while since my last post but have several coming your way...
I have recently installed Fox 2.6 on a windows 10 32bit virtual machine.
in my new environment, I seemed to have a lost a setting where an inactive FoxPro Run Command screen would close automatically. Now I have to click the X in the upper right or click the upper left corner to open a menu window and select close to manually close the window. In this particular sequence, I have to do that twice as it involves deleting files and executing a zip of files, 2 separate dos commands.
thoughts appreciated
Joe
RE: Fox 2.6 Closing inactive foxpro run command window
What if you post some screenshots of your situation. Just click the Image tool in the Reply section and follow the instructions.
Chriss
RE: Fox 2.6 Closing inactive foxpro run command window
Sorry for the confusion... In a program, i am executing some commands that deletes files and also backs up files to a zip. When the command executes, the Run Command window opens as shown. This closes automatically when the command is completed in my Windows XP environment. In my Win 10 32 bit environment, it does not. I was wondering if anyone had this issue but found a solution
RE: Fox 2.6 Closing inactive foxpro run command window
Chriss
RE: Fox 2.6 Closing inactive foxpro run command window
My dad was the original programmer, but here's what I know...
The program executes this bat file using the command RUN LM_BKUP.BAT
It executes the following
DEL BACKUP\BACKUP.ZIP
DEL *.BAK
DEL *.TBK
DEL *.ZIP
DEL *.TXT
DEL *.CSV
WZZIP BACKUP\BACKUP.ZIP C:\FOXPROW\USA\PPSMA\LM_*.*
The image shows file not found as it did not find any of the above extensions to DELETE.
It executes the winzip command and the zip is created
Then the above DOS window hangs open as inactive. It closes automatically in my other environment, using same program.
RE: Fox 2.6 Closing inactive foxpro run command window
I think you'd be better of on a more recent Windows version to use the file extension cmd, not bat.
If I run a bat file on Windows 10 Windows comes up and offers to look for an app for bat files. This has changed in Windows, not in Foxpro.
And the window you show is an OS window. Change the file extension to cmd instead of bat and you'll see it works and closes after finishing.
I can even imagine the reason a bat extension still works. Partly because it's the old etension for batch files, partly because FoxPros Run command is very closely related to starting a Windows Shell and running a batch/text file it executes the shell commands. If you Run an EXE, for example, you also get a short blink of a shell window that finally starts the EXE.
So Run in itself is causing a Shell Window to open. Whether it closes or not is perhaps a setting you can do in Windows somewhere, but not in FoxPro.
Chriss
RE: Fox 2.6 Closing inactive foxpro run command window
RE: Fox 2.6 Closing inactive foxpro run command window
It's starting command.com, but the usual OS command shell now is cmd.exe since a long long time. You might be adressing that pif file, too.
You'll find more on that file in the Foxpro help. In VFP9 this still exists, but plays no role for Windows Vista or higher. Anyway, if I run a cmd batch file the shell window closes after the script finishes.
Chriss
RE: Fox 2.6 Closing inactive foxpro run command window
That was it! the PIF file.
So, it was KILLING me because I swear there was a close on exit option and I checked the properties of the bat file... and a few other places. My eventual thought was that Win 10 took that away but your message about the PIF struck a memory... and its weird too because the file doesn't show foxrun.pif with the extension, it identifies as a shortcut to MS-DOS program. THAT, I right clicked, selected program tab and viola... Once I checked that, I reran the code and the windows closed. Sorry I did a poor job of explaining. The fox program my dad made, creates the bat file and then run's it. the "code" i sent over were the contents of the bat file and I should have specified that (novice here). Thanks for giving this some of your thinking minutes, the after thought lead to success. APPRECIATED!
RE: Fox 2.6 Closing inactive foxpro run command window
The help on VFP says VFP now determines wht RUN uses by the OS environment variable %COMSPEC%, and that's cmd.exe
In Windows10 I cant even edit a PIF file like that anymore, I can only see it contains command.com by looking into it as binary file with a hex editor. Windows 10 shows a pif file as if it was a shortcut (.lnk file), which it kind of is. The compatibility has dropped about this.
I recommend you try this: Rename Foxrun.pif to _Foxrun.pi_, then see what the run command starts. You may edit the COMSPEC environment variable to command.com to check whether also Foxpro 2.6 then uses the COMSPEC environment setting. You lose the ability to determine that close on exit flag. But it's standard for the cmd.exe
You could also use RUN /N to get this even more into your control, you can RUN /N cmd.exe /K scriptfile to keep it open and RUN /N cmd.exe /C scriptfile to close the shell window. Keeping the shell window open can be handy to check things after the script executed.
Just try to get independent from a pif file, the OS doesn't support it fully anymore. And all RUN does in the end is start command.com or cmd.exe, RUN /N is more like a create any process, but can of course be used to create one of these, too. I'm not sure FoxPro 2.6 has RUN /N, but I think it does. One other difference is the /N also stands for nowait, so FoxPRo doesn't wait for the process started to exit.
Chriss
RE: Fox 2.6 Closing inactive foxpro run command window
RE: Fox 2.6 Closing inactive foxpro run command window