how to find a .xml's location after deployment?

warrent

Member
Joined
Nov 19, 2005
Messages
12
Programming Experience
3-5
I need to access some xml files but how can I find the location of the xml files have a user has installed my program onto his own PC?

Currently I have written my xmlfile.load() to a specific location, but its not going to work unless the user installs the files on his PC in the same location.
 
I'm not sure but if the file is in the same dir as your app just use file.xml if it's in a sub dir of your app then "subdir/file.xml

However I could be wrong I'm a real newbie
 
I am using refreances in my code as I listed above, without application.startuppath.

to test this I copied my debug dir to my desktop changed a value in my xml file. I then ran the exe and everthing loaded fine. So my question is application.startuppath realy needed or will it work diffrent on another os?

Please understand I'm not tring to enrage anyone just want to understand...
 
It's "SAFAEST" to use the Application.StartUpPath.....Then you are guaranteed to know exactly where you are in the file system.

-tg
 
Back
Top