Problem with spaces in path (Vista) - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Microsoft Windows and Software
Click Here to Login
Closed Thread
 
Thread Tools Display Modes
 
Old 08-09-2007, 01: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, 01:17 PM   #2 (permalink)
Master Techie
 
Alvin.C's Avatar
 
Join Date: Jun 2004
Location: United Kingdom
Posts: 2,580
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
linkedin.com/in/alvinwkchan

|Gaming PC| |Dell Latitude E7250| |Macbook Air 13" (Mid 2013)|
|Windows 10 Pro (x64)| |Intel Core i5-6600 @ 3.3 GHz| |MSI NVIDIA GeForce GTX 1080 Gaming X| |Noctua NH-D15S CPU Cooler| |Gigabyte GA-Z170MX-GAMING 5 mATX Motherboard| |Samsung 840 Pro 256GB SSD| |Corsair Vengeance LPX 16GB DDR4-SDRAM| |OCZ ModXStream Pro 700W Modular PSU| |NZXT Vulcan Micro ATX Case|
Alvin.C is offline  
Old 08-09-2007, 01: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, 03:23 PM   #4 (permalink)
Call me Mak or K
Mod Emeritus
 
KSoD's Avatar
 
Join Date: Sep 2004
Location: C:\
Posts: 35,647
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?
__________________
I do not accept support questions via EMail, PM, IM or my G+ page!

Phone: LG Optimus G Pro
Running: Stock JB from LG with Nova Launcher

KSoD is offline  
Old 08-10-2007, 07: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, 09:19 AM   #6 (permalink)
Call me Mak or K
Mod Emeritus
 
KSoD's Avatar
 
Join Date: Sep 2004
Location: C:\
Posts: 35,647
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.
__________________

__________________
I do not accept support questions via EMail, PM, IM or my G+ page!

Phone: LG Optimus G Pro
Running: Stock JB from LG with Nova Launcher

KSoD 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 Off


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



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 06:01 AM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.