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]

Running Windows scripts & PATHEXT


Being in a Windows environment is made a lot more palatable with Cygwin - we all know this. But we often face others who don't know, understand or want to use/learn Cygwin or who want what we might develop in Cygwin available for others who don't have Cygwin. As such I've been writing some Visual Basic (ick! But I'm getting used to it...) and cmd scripts.

Now one problem is that I write a script intending for it to have stdin/stderr connected to a terminal. But by default vbs files are executed by wscript and calls to WScript.Echo pop up a message box for each call. However I can execute cscript to have it run "normally" writing to stdout. Now cscript display ugly logo info which can be suppressed by using /nologo. So I want an invocation of myscript.vbs to run cscript /nologo myscript.vbs. I think I can do that by making the appropriate registry entries but I still have to execute at least myscript.vbs.

I've also made a Perl script file type and have added .pl to the PATHEXT variable so that I can invoke a Perl script such as myscript.pl simply by typing myscript (in cmd but not in bash - in bash I need to specify myscript.pl).

So it seems that bash does not take into account the PATHEXT variable when searching for executables. Now I know that PATHEXT is very Window'ish and bash need not support it but perhaps Cygwin's bash does somehow and I merely need to configure it correctly? I"m looking to be able to simply type myscript and have it run myscript.pl (or myscript.cmd or myscript.vbs - I guess I oughta ask: How would it determine which one to run in the face of multiple scripts? I guess order of the PATHEXT?)
--
If you can smile when things go wrong, you have someone in mind to blame.



-- 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]