This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: CYGWIN Installer should setup a root environment variable
Chris Walters wrote:
`cygpath -w /`
This is fine, but how do I use the result in a DOS bat script?
The short answer is: Get a real shell.
The long answer is: While there may be some hack to trick a Microsoft
command shell into setting an environment variable from a command's
output, it seems to me that it would be a lot easier to port your BAT
file to Bash. There's certainly nothing in the cmd.exe "SET"
documentation about doing this.
About the only time that only a BAT file will do is for autoexec.bat.
--
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/