DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
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!

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links