Problems with long file paths (embedded spaces) after installing S

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The problem symptoms are:

When an executable program is started from Windows Explorer (versus DOS
prompt), the spaces (if any) in the file path to the executable are
misinterpreted as (invalid) command line arguments/file names to open:

e.g. C:\Program Files\Microsoft Visual Studio .NET
2003\Common7\IDE\devenv.exe will WORK, but complains about not being able to
open files named:
a) Files\Microsoft
b) Visual
c) Studio
d) .net
e) 2003\Common7\IDE\devenv.exe

similar problems occurs with MS Office products, e.g. Outlook, Excel,
PowerPoint, as well as non Microsoft products, e.g. Adobe Reader, XML SPY

e.g.

a) Excel complains: "Files\Microsoft.xls could not be found"
b) PowerPoint complains: "the path or file name for C:\Program is invalid"
c) Outlook complains: "The command line argument is not valid"
d) XMLSpy complains: "Files\Altova\XMLSpy2005\XMLSpy.exe could not be opened"

Note as stated above that this problem does NOT occur if starting the
executable from a DOS prompt, or invoking a file of the file type associated
with that executable

Note also that copying the executable to a path with no embedded spaces also
solves the problem, e.g. C:\

Note for Visual Studio specifically, invoking devenv.com instead of
devenv.exe also solves the problem

Note also that some executables (e.g. sql server enterprise manager) have no
problems, perhaps because they don't expect/support command line arguments

? Related ? IE does NOT start with my home page: it tries to open:
http://files/Internet Explorer/iexplore.exe

Unistalling SP2 makes all these problems disappear
ReInstalling SP2 causes all these problems to re-appear
Un-Unistalling SP2 makes all these problems disappear again
 
So what's your question? Do you want to solve this?

The solution is to enclose the path in quotes.
 
You'll note I said i have no problems when i run these executables from a DOS
prompt - the issue is clicking on an executable in Windows Explorer where the
path is assumed.

Yes, I want to solve this

Thanks

David
 
Check the value of the EXEFILE open command in the registry:

HKEY_CLASSES_ROOT\exefile\shell\open\command

It should be: "%1" %*
 
Thanks - I note (now that I've uninstalled SP2 so I can do my work) that the
registry value is %1 %* - Note there are no quotes around %1

I'll reinstall SP2, revise this registry entry, and see if my problem is
solved

David
 
YES! putting the "" quotes around %1 in that registry key fixed the problem!!

Thanks!!!

David

P.S. Am I the only/first person in the world to have had this problem?
I've been posting/googling for weeks!!
 
Back
Top