Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi
I am having a few problems with a secondary command enviroment that is opened in MSDOS. These problems are:
When the command launching the secondary enviroment executes in the AUTOEXEC.BAT the remaining section of the AUTOEXEC.BAT is not completed. This is due to the launching of the new enviroment. Also, all evniromental settings are lost due to this.
What I need to know is how to complete the AUTOEXEC.BAT or start a new batch file in the secondary enviroment that can complete what was to be done in AUTOEXEC.BAT. Needless to say this need to be done automatically since the option to boot with is labled Autostart.Thanks

If you are calling batch files from within batch files, do NOT simply execute the second batch file, use the CALL function instead.
example:
loadhigh c:\dos\doskey.com
loadhigh c:\dos\mouse.comcall macros.bat
mem
verWhere macros.bat is a batch file which contains a list of aliases. The file called does not have to be a batch file, it can be any executable file, I believe.
You shouldn't be using command.com in your AUTOEXEC.BAT.
If you are trying to increase the environment size, or tell your OS to use a different command interpreter after booting, use the following in your CONFIG.SYS:
SHELL=c:\dos\command.com /e:8192 /p
/e:WXYZ, environment variable size, in bytes.
/p makes command interpreter permanent. (an EXIT command will not end the current session)-Doug

Hi
Ok, let me go into a little more detail. I am using NTFSPro for DOS. It has 2 options. One uses all extended ram to load. Needless to say DOS software will have issues with DPMI (errors like Not enough DPMI ram). The second option is that a DOS/4GW version is used. The only problem is that this version wasnt as part of the command line a location for COMMAND.COM. Once NTFSPro loads, it loads the new command enviroment. There goes anuthing from the previous enviroment. I have looked at the Knowledge Base for the product, and there is no answer for this.
Also, what I was wondering. If I were to remove the /P option in the Config.Sys Shell=Command.com line, will the loading of a new Command.com load "update" the Command enviroment loaded by Config.sys?
Thanks for the help so far.
Mac

Using the SHELL= command in your config.sys with the /p switch file is usually used to increase the environment variable size. It is also used to specify a location for the OS to find the command interpreter if it's not located in the root directory of the disk which was booted from.
The first shell is ALWAYS permanent. Any shells invoked after the first simply sit ontop of the permanent one. Environment conditions and variables (PATH, etc.) are NOT passed from shell to shell in DOS. (I am not sure if there is an EXPORT command in DOS.)
Removing the /p switch will not help you.
How does your software start? What commands are required to invoke it? If it's a batch file, you may be able to edit it such that it will not invoke it's own command interpreter for the duration of its execution. If it is an executable file, you may be out of luck. If it's a .com file, you may try to say that SHELL=c:\"your .com file here".
You have nothing to lose by trying.
Use F5, F8, or F9 (I don't remember which) to prevent DOS from using your config.sys and autoexec.bat when booting (when you see Starting MS-DOS) in case the above modifications don't work. (You will bypass the files, and be able to undo your changes.)

Thanks. I guess I am out of luck then. It was worth a try to ask. I to have not yet seen an Export command for DOS. This would be very useful.
The program is an executable. All I did was add its full command line, as needed to run, into the Autoexec.bat. Oh, well, I do have a backup option. It will require the user to type a few letters and hit enter. That is, I just create a batch file with the necessary commands in to complete the boot sequence and warn the user from the Autoexec.bat that the will need to type the batch command.Again thanks.
Mac

![]() |
Unique .Com file request
|
vga driver is not istalli...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |