|
-
May 3rd, 2008, 05:59 PM
#1
Thread Starter
Frenzied Member
[2005] Vista is different!
Hello, i made a program that has a function in it that calls upon a route:
C:\Documents and Settings\users name\etc...
I had a few Vista users that wanted the program but when i looked at a vista pc at a pc store i saw that they use different routes. They use C:\users name\your favourite file\etc...
They just use different routes the route i showed above isnt the one they sued its just to explain how different.
Anyway, Vista computers have different routes so that means automaticly that function wont work. Will my whole application not work on a Vista Computer or is it just the functions that only apply to XPs etc..?
-
May 3rd, 2008, 06:31 PM
#2
Re: [2005] Vista is different!
You shouldnt use hard coded string literals for things like this.
The Environment class can give you sufficient information about the current platform.
For example, this will give you the path to the "My documents" folder, regardless of the platform:
VB.NET Code:
Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
-
May 4th, 2008, 06:46 AM
#3
Frenzied Member
Re: [2005] Vista is different!
Or you can use My.Computer.FileSystem.SpecialDirectories and by selecting one of the given directories, get the path directly.
Please rate helpful ppl's posts. It's the best 'thank you' you can give 
-
May 4th, 2008, 11:56 AM
#4
Thread Starter
Frenzied Member
Re: [2005] Vista is different!
Oh..thankyou very much. I may come up with a few questions a long the line because of the purpose i needed to know this but when i have the questions ill ask.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|