This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: telnet cannot see mount drive


     I have a crude, tacky workaround for this that I've been using with the AT command 
since the NT 3.51 days.  It fits much better with cron than with telnet (although 
perhaps something could be hacked up for telnet, too).

     Anyway, I have a little .BAT file in my Startup folder* that (implicitly) starts 
CMD.EXE and runs a little loop that, once a minute,  looks for .BAT files in my 
f:\Batch directory.  Whenever it finds one, it moves it to \Batch\Started and start up 
another CMD.EXE.

     Because this CMD.EXE was started in the context of my Windows NT login session, it 
has access to the drives I see interactively.  I can write batch jobs using the same 
drive mappings and not have to think about it.  My batch jobs, instead of being 
submitted directly, just put a stub in f:\Batch that points to the real job.

     I suppose, on the same principle, one could start a sort of CMD server in this 
context which would receive input/send output on a pipe, mailslot, whatever.  Whether 
it would perform reasonably for use with telnet, seems iffy, but vaguely possible. . .

     I imagine someone who knew the guts of NT pretty well could come up with a 
snappier solution, but that wouldn't be me.:-)  Meanwhile, what I have works for what I 
need it for.

*in NT 3.51, this seemed to need to be started as a login script, but
 NT 4.0 is happy if it's run from the Startup folder, which is a little
 less messy to set up.

> On Thu, Jan 10, 2002 at 01:07:35PM +0000, David Starks-Browning wrote:
> > On Thursday 10 Jan 02, Corinna Vinschen writes:
> > > Did you see my previous mail related to using network drives
> > > in ssh sessions, David?  That's the crucial stuff.
> > 
> > Probably, but I may have to dig around my archives.  I'll let you know
> > if I can't find it.
> 
> My bad.  I meant "cron", not "ssh".  The problem is the same.
> The message is http://cygwin.com/ml/cygwin/2002-01/msg00607.html
> from today.


start /low /i /min F:\Users\RPraetorius\BatchLoop.bat
exit
path
:again
for %%b in (f:\Batch\*.bat) do call :BatchExecute %%b
sleep 60
goto again
:BatchExecute
del f:\Batch\Started\%~nx1
move %1 f:\Batch\Started\%~nx1
start /i cmd /c "f:\Batch\Started\%~nx1 > f:\Batch\Logs\%~n1.log 2>&1"
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  SubmitToBatchLoop.pl
     Date:  2 Sep 1998, 0:17
     Size:  484 bytes.
     Type:  Program-source

Attachment: SubmitToBatchLoop.pl
Description: Binary data

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]