Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm not sure what I did, but I've somehow got Cygwin installed in such a way that even when I try to run an ordinary windows shell, Cygwin is interfering. I have batch scripts that I want to run in the default windows way that Cygwin complains about. I can't change them; I need to run them in the felaut shell. Is there any way to get my cmd shell back without completely uninstalling cygwin?

More information:

I'm running a Windows batch script that launches a windows executable. I can't change the script OR the executable. These are things that other people use, so they have to stay the way they are. When I run the script, there are some paths that it searches for and automatically generates to pass to the executable (or perhaps the executable generates them for itself). Unfortunately, partway through that process, the exe complains that it can't find D:\foo\bar\baz... because cygwin has tried to 'fix' the path.

If I delete the cygwin1.dll while I run the batch file, I get an error that cygwin wasn't found. So even though I'm in a Windows CMD shell (with the windows prompt), I'm clearly still getting interference from cygwin.

I've removed cygwin from my path all together, and now the script works. To run cygwin, I now have to navigate to the cygwin directory explicitly, run bash, and make sure that bash modifies the path to have the cygwin/bin directory in it.

I mainly want a way to run scripts in a default windows environment with default windows paths because I'm not 100% in control of the scripts and executables that need to be run as a part of my day-to-day work, and it's wildly inefficient for me to go and rewrite every script that doesn't play nice with cygwin.

(It's worth noting that running the script using 'cmd /c script.bat' from the Win-R run box works just fine.)

share|improve this question
    
Any example ? Which scripts are you running and where ? –  Luc M Jul 18 '12 at 20:33
    
So say I want to run foo.bat. Foo.bat starts an exe, and that exe takes a path as an argument. What's happening right now is that when I run foo.bat, everything is fine until the exe starts. Then cygwin complains that the path isn't the way it likes, munges it badly, and passes that to the exe, which is totally confused. If I rename cygwin1.dll to something else, when I get to the part where the exe runs, the shell complains that cygwin1.dll is missing. –  RealityMonster Jul 18 '12 at 20:47
2  
This is not fit for SO. More like SU or SF. –  Cole Johnson Jul 18 '12 at 21:01
1  
Well, it's one of my programming tools, and it's a significant part of my current workflow, but I might get people more familiar with this sort of problem on SF. I admit, I didn't think of that; I come straight to SO because my problems are all connected to my programming one way or another. –  RealityMonster Jul 18 '12 at 21:23
    
Cygwin is not overriding the Windows cmd shell. If you gave us actual symptoms (ie, I do x, y then z, and A happens when I expect B), we'd be able to tell you why you're seeing what you're seeing. It sounds like you're running a Cygwin binary with a Windows path, in which case I'd expect the Cygwin binary to get confused; you need to convert the paths using (for example) cygpath. –  me_and Jul 19 '12 at 12:26
show 1 more comment

migrated from stackoverflow.com Jul 19 '12 at 6:34

This question came from our site for professional and enthusiast programmers.

1 Answer

You should still have access to the standard windows shell. But if not, try running the scripts using cmd, e.g.:

cmd /c foo.bat

This should work even from the cygwin shell.

share|improve this answer
    
I tested it running cmd from an already running cmd window and it didn't work, but if I run it right from the windows run window, it does. It seems like I have both the windows and cygwin shells fighting one another at the moment; I have the windows path prompt, but when I actually get to running commands, cygwin takes over. –  RealityMonster Jul 18 '12 at 21:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.