Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!bu.edu!rpi!joefritz From: joefritz@pawl.rpi.edu (Jochen M. Fritz) Newsgroups: comp.os.msdos.programmer Subject: EXEC'ing command.com /p Keywords: command.com, DOS, EXEC Message-ID: <3-D^-&%@rpi.edu> Date: 10 Dec 90 18:55:06 GMT Organization: Rensselaer Polytechnic Institute, Troy NY Lines: 36 Nntp-Posting-Host: pawl8.pawl.rpi.edu This is a repost from alt.msdos.programmer. I got one piece of advice, that did not solve the problem. For this reason, I am reposting this in the hope that more readers will see it (and reply?). Sorry if you already read this on the alt group, but I did not get any answers there. I have been unsucessful in spawning a copy of comand.com that reads the autoexec.bat file. The shell starts up prompts for the date+time (same as if it couldn't find an autoexec, then refuses to exit (the other effect of /p) I have tried entering command /p from both command.com and mssh, and they did read the autoexec.bat file. For some reason, it only refuses to do so for my programs. What am I doing wrong? The details: DOS 3.2 640K RAM language: Turbo C++ and Turbo Assenbler (the routine is written in TASM) function used: 4B (sub 0) (Load and execute subtask) contents of DOS call 4Bh barameter block (this is from memory, they may not be in the right order) command line (ptr to [02,'/','p',0Dh] env NULL (use current) FCB(1+2) NULL PS, no flames about why I would want to spawn a permanant shell. I did create a backdoor :) ------------------------------------------------------------------------ | Jochen Fritz | For though we live in the world, we do not | | joefritz@pawl.rpi.edu | wage war as the world does.-- 2 Cor. 10:3 | | usergk2s@rpitsmts.bitnet| You have heard it said, Love your neighbor | | Noah [the peace monger] | and hate your enemy. But I tell you: Love | | | your enemies. Matt. 5:43-44 | ------------------------------------------------------------------------