Solved

Visual Basic path

Posted on 2012-03-16
1
198 Views
Last Modified: 2012-08-13
I have a windows application that uses an external database and calls an external application to run. I need this application to run from a thumb drive so I cannot hard code the path for the database and external application. How do I determine that path for the thumb drive this application will run from and not the traditional location of the temporary folder that windows runs it from.
0
Comment
Question by:rawilken
1 Comment
 
LVL 5

Accepted Solution

by:
Aruiz04 earned 500 total points
Comment Utility
I would use an OpenFileDialog, select the application you want to run and save the application's path to a file for later retrieval. Once saved on a file, everytime you open your first application, read the file, check if the file exists and run the second application, if the second application's path has changed it no longer exists so open the openfiledialog and browse for it, save the path again to the file and execute the second application.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now