Computer ForumsComputers  

Go Back   Computer Forums > PC Technology Zone > Windows Operating Systems and Software

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 08-09-2007, 12:01 PM   #1 (permalink)
Newb Techie
 
Join Date: Aug 2005
Posts: 12
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, 12:17 PM   #2 (permalink)
Master Techie
 
Alvin.C's Avatar
 
Join Date: Jun 2004
Location: Newcastle-under-lyme, Staffordshire, United Kingdom.
Posts: 2,028
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

|Desktop PC|

|AMD Athlon 64 X2 4800+| |Sapphire HD 4850 512MB GDDR3 PCI-E|
|Foxconn 6150M2MA-KRS2H| |Crucial Ballistix 2GB PC2-6400 CL4| |OCZ Stealth X Stream 500W PSU| |Seagate ST380815AS 80GB SATA II 7200RPM HDD| |Optiarc AD-7191S SATA Lightscribe DVD±R|

|Notebook PC|
|HP Compaq nx7300 Business Notebook|
Alvin.C is offline  
Old 08-09-2007, 12:24 PM   #3 (permalink)
Newb Techie
 
Join Date: Aug 2005
Posts: 12
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, 02:23 PM   #4 (permalink)
Commander Super Mod Joker
 
Mak213's Avatar
 
Join Date: Sep 2004
Location: In Trotter's crawl space
Posts: 13,708
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?
__________________



Mak213 is online now  
Old 08-10-2007, 06:07 AM   #5 (permalink)
Newb Techie
 
Join Date: Aug 2005
Posts: 12
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, 08:19 AM   #6 (permalink)
Commander Super Mod Joker
 
Mak213's Avatar
 
Join Date: Sep 2004
Location: In Trotter's crawl space
Posts: 13,708
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.
__________________



Mak213 is online now  
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 04:31 PM
Vista Startup problem worrwhorre Windows Operating Systems and Software 5 08-07-2007 08:03 PM
Major problem with Vista (I think) buffer Windows Operating Systems and Software 2 07-30-2007 09:09 AM
Vista activation problem Max Power Windows Operating Systems and Software 11 07-12-2007 03:01 PM
Another Hijack Log boo HijackThis Logs (finished) 17 06-26-2007 11:30 AM


All times are GMT -5. The time now is 09:15 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0