In microsoft.public.win2000.cmdprompt.admin David Winfrey wrote:
> I wanted a batch file to run when I started the command shell,
> so I added to HKEY_CURRENT_USER\Software\Microsoft\Command
> Processor a new string, AutoRun="d:\usr\home\cmdsetup.bat".
>
> It worked perfectly, until I ran a program that used spawn()
> to call another program. In a loop. A long loop. And at
> every iteration of that long loop, my cmdsetup.bat got
> executed.
>
> Is there some way (short of upgrading to Win98) to set up an
> AutoRun that will execute only when the shell is started by
> clicking on the desktop shell icon, and NOT when the shell is
> run from inside some other program?
Why not point that shortcut (in)directly to cmdsetup.bat instead?
Possibly with adjustments like CLS and no EXIT statement.
Sonething like
CMD.EXE /k d:\usr\home\cmdsetup.bat
But perhaps this all can be done otherwise, depending on what
cmdsetup.cmd actually does... ?
|