changing drive letter automatically

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spazzo6281
    New Member
    • Feb 2008
    • 13

    changing drive letter automatically

    Hello again, in my program i have it to search a certain path for files example:

    Code:
    f:\archive\files
    is there a way that if the program gets installed on a different drive that the "f" will automatically be changed to the new drive letter. example:

    the code is written like this
    Code:
    f:\archive\files
    if i want to install the program on the "c" drive instead the line of code will automatically change to:
    Code:
    c:\archive\files
    any help will be greatly appreciated
  • KodeKrazy
    New Member
    • Mar 2008
    • 32

    #2
    First: NOTHING is "Automatic" when programming. You have to define virtually everything, hence the name "Programmin g". <GRIN>

    Second: Have you tried using the My.Computer.Fil eSystem object. It contains all of the functionality you will need to accomplish the task @ hand...

    Alternatively, you could have the application set a registry key (it may already do this) containing the path to itself, and then just read the registry key and return the correct path. But there is nothing "automatic" about it. You have to define it.

    KK

    Comment

    Working...