Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 08-09-2007, 01:01 PM   #1 (permalink)
 
Newb Techie

Join Date: Aug 2005

Posts: 12

cwright

Default Problem with spaces in path (Vista)

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
cwright is offline  
Old 08-09-2007, 01:17 PM   #2 (permalink)
Alvin.C's Avatar
 
Master Techie

Join Date: Jun 2004

Location: United Kingdom

Posts: 2,439

Alvin.C is on a distinguished road

Default Re: Problem with spaces in path (Vista)

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.C

| Macbook Pro 13" (Mid 2009)|
|
Mac OS X 10.6.2 | Windows Server 2008 R2| |Intel Core 2 Duo 2.26GHz| |Nvidia GeForce 9400M| |160GB SATA HDD| |PC3-8500 DDR3-SDRAM|

|Acer Aspire Revo R3600|
|Windows Server 2008 R2 | Xubuntu 9.10| |Intel Atom 230 1.6GHz| |Nvidia ION| |2GB DDR2-SDRAM|
Alvin.C is offline  
Old 08-09-2007, 01:24 PM   #3 (permalink)
 
Newb Techie

Join Date: Aug 2005

Posts: 12

cwright

Default Re: Problem with spaces in path (Vista)

Quote:
Originally Posted by Alvin.C View Post
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
cwright is offline  
Old 08-09-2007, 03:23 PM   #4 (permalink)
Mak213's Avatar
 

Join Date: Sep 2004

Location: C:\Windows\System32

Posts: 25,658

Mak213 is a name known to allMak213 is a name known to allMak213 is a name known to allMak213 is a name known to allMak213 is a name known to allMak213 is a name known to all

Default Re: Problem with spaces in path (Vista)

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?
__________________
R.I.P. Danny L. Trotter
14 Nov 1945 - 4 Sept 2009
Images created by CarnageX | Decaptured...Listen! | Visit Baezware!! | You've been Mak'd! | 儿做好
I do not accept support questions via EMail, PM, IM or my Spaces page! .:|:. This is what happens when an unstoppable force meets an immovable object.
Thanks to all the guys on the staff for your support in my time of need. Hefe you are my personal Hero for your contribution.



<<<< If I help you, or you just like what I said, rep me
Mak213 is offline  
Old 08-10-2007, 07:07 AM   #5 (permalink)
 
Newb Techie

Join Date: Aug 2005

Posts: 12

cwright

Default Re: Problem with spaces in path (Vista)

Quote:
Originally Posted by Makaveli213 View Post
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
cwright is offline  
Old 08-10-2007, 09:19 AM   #6 (permalink)
Mak213's Avatar
 

Join Date: Sep 2004

Location: C:\Windows\System32

Posts: 25,658

Mak213 is a name known to allMak213 is a name known to allMak213 is a name known to allMak213 is a name known to allMak213 is a name known to allMak213 is a name known to all

Default Re: Problem with spaces in path (Vista)

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.
__________________
R.I.P. Danny L. Trotter
14 Nov 1945 - 4 Sept 2009
Images created by CarnageX | Decaptured...Listen! | Visit Baezware!! | You've been Mak'd! | 儿做好
I do not accept support questions via EMail, PM, IM or my Spaces page! .:|:. This is what happens when an unstoppable force meets an immovable object.
Thanks to all the guys on the staff for your support in my time of need. Hefe you are my personal Hero for your contribution.



<<<< If I help you, or you just like what I said, rep me
Mak213 is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
10 Reasons You Don't Need Vista Today Cyber.Logan Building, Buying, or Upgrading High Performance PC Systems 47 08-15-2007 05:31 PM
Vista Startup problem worrwhorre Windows Operating Systems and Software 5 08-07-2007 09:03 PM
Major problem with Vista (I think) buffer Windows Operating Systems and Software 2 07-30-2007 10:09 AM
Vista activation problem Max Power Windows Operating Systems and Software 11 07-12-2007 04:01 PM
Another Hijack Log boo HijackThis Logs (finished) 17 06-26-2007 12:30 PM