I am having a weird error,
My code compiles, and runs perfectly fine on Windows Vista and Windows 7 error free. However, when I try running it on Windows XP when I try reading/writing to a file, it crashes and gives me an IO error saying the config file is not in directory.
The file I am trying to read/write to is: /config/Rooms.cfg (this reads / writes correctly on vista / 7), however on XP it is looking for the file in /sources/config/Rooms.cfg
I have attached the source for the main form, if other code is required I can post it too.
Loading
FroglegPosted Mar 22, 2011, 6:22 PM
To put your cfg files in same folder as exe use
Application.StartupPath
David RichardsonPosted Mar 23, 2011, 12:45 AM
David RichardsonPosted Mar 22, 2011, 5:37 PM
Regardless, The location I save my config files to should not have anything to do with the file path being something totally different in XP over Windows 7 / Vista should it?
FroglegPosted Mar 22, 2011, 3:52 PM
Environment.SpecialFolder.ApplicationData
or
Environment.SpecialFolder.MyDocuments