Problem with spaces in path (Vista)

Status
Not open for further replies.

cwright

Solid State Member
Messages
12
Hello all,
I'm the author of a program called AutoStar for Microsoft Flight Simulator. I'm using Visual Basic 5.
A user informed me of a problem. He uses Windows Vista (I use XP). It turned out that my program could not write a file to a location if there were spaces in the path. I had the idea of using a batch file to get over this problem. A typical example:

copy c:\fsx\stars.dat C:\Programs\Microsoft Games\Microsoft Flight Simulator X\stars.dat

This batch file works fine on my XP system but not on his Vista system. He found that it did work when using it to copy a file to a location with no spaces in the path.
We tried putting the path with spaces inside quotation marks, but no joy.

Does anyone have any ideas? Is there a known problem with spaces in paths when using Vista?

Many thanks,
Chris
 
Hello,

Did he enclose the paths in " marks (double quotation marks)?

e.g. copy "c:\fsx\stars.dat" "C:\Programs\Microsoft Games\Microsoft Flight Simulator X\stars.dat"
 
Hello,

Did he enclose the paths in " marks (double quotation marks)?

e.g. copy "c:\fsx\stars.dat" "C:\Programs\Microsoft Games\Microsoft Flight Simulator X\stars.dat"

Alvin,
Yes, but only the second path e.g.
copy c:\fsx\stars.dat "C:\Programs\Microsoft Games\Microsoft Flight Simulator X\stars.dat"

Best regards,
Chris
 
Well first you should be contacting M$ over this. They would have the answer faster than any one of us.

2nd yes Vista does handle paths with spaces differently. How so i can not say for sure but i know it does. I think the spaces need to be filled with _ in order to work right.

Also could it be the UAC preventing the user from doing this correctly? Has the user tried to run this with Admin rights by right clicking on it?
 
Well first you should be contacting M$ over this. They would have the answer faster than any one of us.

2nd yes Vista does handle paths with spaces differently. How so i can not say for sure but i know it does. I think the spaces need to be filled with _ in order to work right.

Also could it be the UAC preventing the user from doing this correctly? Has the user tried to run this with Admin rights by right clicking on it?

Makaveli,
thanks for the response. It might be possible to change the directory names. I tried it. There were several minutes of intense disk activity as presumably Flight Simulator updated its indexes, but after that it worked just fine. Unfortunately this might be a problem if the user has many add-ons, so it wouldn't be a very good solution.

The user did mention that he often gets warning messages from Vista, presumably due to extra security features. But he reported there were no such messages when this problem occurs. But could the security really cause a problem when running a batch file that happens to have spaces in the path? Unfortunately I - and probably the user - don't really know enough about Vista security, so I could hardly advise him without a lot more information on the subject.

Many thanks.

Best regards,
Chris
 
The UAC can cause issues with any file that tries to change or modify any system files. So if the batch file tries to modify any system files, even after a install of Flight Sim then yes the UAC would cause this issue.
 
Status
Not open for further replies.
Back
Top Bottom