Initial Dir


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Initial Dir

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    Initial Dir

    [Originally posted by Jeff Peterson]

    This SHOULD be easy, but it's driving me NUTZ! How do I determine what directory my app starts up in? I need to open some aux files, and the user can choose whatever directory they want to install to.

    Ideally, the Package and Deployment Wizard would stamp a registry key, but it doesn't.

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Initial Dir

    [Originally posted by Nick Dawkes]

    use the path property of the application object ie:
    dim InitDir as String
    InitDir = App.Path

    This will get you the directory/path on which the exe is executed from
    Beware in development mode it returns the VB directory
    cheers
    nick

  3. #3
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Re:Initial Dir

    [Originally posted by HighCommander]

    EXE's will return the directory they are run from.

    Once you save a project...

    App.Path WILL return the directory you saved your project in.


  4. #4
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Re:Initial Dir

    [Originally posted by Jeff Peterson]

    DOH!

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center