delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/02/19/04:42:16

X-Spam-Check-By: sourceware.org
Message-ID: <20060219094158.15236.qmail@web81508.mail.mud.yahoo.com>
Date: Sun, 19 Feb 2006 01:41:58 -0800 (PST)
From: Indra Gunawan <indrg AT yahoo DOT com>
Subject: Perl script called by windows batch file in Scheduled task can't find mount or windows share
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Although I've found many issues related to "mount"
I've yet to find the answer to my current problem. 
So, I hope I can find the answer from my posting now.

Anyway, I would like to copy the software installer
exe file to a n ftproot folder on another windows
machine as part of software build process for
download.  The build process itself is automated in a
perl script under cygwin environment called by batch
file executed as Windows Scheduled Task.

It's executed in batch file like this:
c:\tools\cygwin\bin\bash --login -c 'source
/temp/machenv;time
c:/scripts/batch/NightlyBuild/build.pl' > logs/bld.log
2>&1

I've made sure that I mapped the ftproot folder as UNC
path using the local administrator of the ftp hosting
machine first:

net use \\<Machine_Name>\C$\Inetpub\ftproot <password>
/user:administrator /persistent:yes

and in cygwin bash shell I did this:
mount \\\\<Machine_Name>\\C$\\Inetpub\\ftproot
/ftproot -s -E

All are fine.  However, the test for existence of this
folder /ftproot fails, thus the copy does not work in
the build script as executed by batch file in
Scheduled Task.

However, if I launch Windows shell and run the batch
file, the build script works and the copy is
successful.

I created a new scheduled task to execute simple batch
file which  calls a perl script to debug/find out
about the "mount" command in cygwin.  This mount point
/ftproot is still available but the script issuing "cd
/ftproot" and "ls" both fail.  

cd: can't cd to /ftproot
ls: /ftproot: No such file or directory

However, again running it in Windows shell the "cd
/ftproot" and "ls" work.

Is the issue with the bash, or the Windows Scheduled
Task or some issue with mounting UNC share?

Thanks.
-Indra   

   








  

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019