This is the mail archive of the cygwin 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]

Perl script called by windows batch file in Scheduled task can't find mount or windows share


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/


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