Results 1 to 4 of 4

Thread: [2005] Vista is different!

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2008
    Posts
    1,754

    [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..?

  2. #2
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    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:
    1. Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  3. #3
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    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

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2008
    Posts
    1,754

    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
  •  



Click Here to Expand Forum to Full Width