# [GHC] #4266: ghci can't find ghc.exe on Windows 7 if the path contains spaces

Sat Aug 21 17:40:30 EDT 2010

```#4266: ghci can't find ghc.exe on Windows 7 if the path contains spaces
-------------------------------+--------------------------------------------
Reporter:  refold          |       Owner:
Type:  bug             |      Status:  new
Priority:  normal          |   Component:  GHCi
Version:  6.12.3          |    Keywords:
Testcase:                  |   Blockedby:
Os:  Windows         |    Blocking:
Architecture:  x86_64 (amd64)  |     Failure:  GHCi crash
-------------------------------+--------------------------------------------
platform/ticket/136 Haskell Platform trac]. Platform installer puts
this causes ghci to fail on Windows 7 (but not XP!) with 'Unable to locate
ghc.exe' when run from the command line. Installing HP to `C:\hp2010`
fixes the issue.

Looking at ghci.c, this is caused either by a call to `SearchPath`, or a
call to `GetShortPathName`. The latter looks more suspect. I don't have
access to a Windows 7 machine currently, so I can't fix this myself.

--