delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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 |
Message-ID: | <D456F33B21436C419F1296101FD4686D3B2884@sv030210.mewa-group.com> |
From: | troy DOT holly AT mewa DOT de |
To: | cygwin AT cygwin DOT com |
Subject: | Re: UNC paths are not supported. Defaulting to Windows directory |
. | |
Date: | Fri, 6 Dec 2002 12:22:41 +0100 |
MIME-Version: | 1.0 |
Note-from-DJ: | This may be spam |
Adrian C. Brown wrote: >Why would I get this error when trying to start cygwin from the >shortcut placed on the desktop? > >CMD.EXE was started with '\\coruscant\users\adrianb\Desktop' as the >current dire ctory path. UNC paths are not supported. Defaulting to >Windows directory. NT-Shells only except working directories that are on a mapped directory drive. > >I am using Windows 2000 professional in a Windows 2000 domain with >folder redirection. > >What can I do to solve this? Here's my solution: ----------------------- bash.bat ----------------------------- @echo off rem rem Bash.Bat rem rem Add this registry entry to get a bash menu item in rem in your context menu (right mouse button) in the rem windows explorer. rem HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Bash\command\Bash.Bat "%L" rem if %1%xxx == xxx goto usage set CYGWIN=tty set _NT_SHELL_DIR=%1 cd %_NT_SHELL_DIR% shift set _BASH_ARGS=%1 %2 %3 %4 %5 %6 %7 %8 bash.exe --norc -noprofile --login ~/.dosLogin goto ende :usage echo "usage: Bash.bat working_directory [bash args]" pause :ende -------------------------------- .dosLogin ------------------------- _BASH_SHELL_DIR=$(cygpath -u "$_NT_SHELL_DIR") exec bash --norc -noprofile -c \ "cd $_BASH_SHELL_DIR 2>/dev/null; \ if [ $? = 0 ] ; then exec bash $_BASH_ARGS; fi" ----------------------------- end ------------------------------------ Now put Bash.Bat on your PATH and .dosLogin in you HOME directory. You may now use a UNC working directory to start bash from the explorer context menu (right mouse button) or via redirection. You still get an error message from windows, that UNC Paths are unsupported. Bash will, however, have the UNC directory as the working directory. Hope this helps. - Troy Holly -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |