Solved

Visual Basic path

Posted on 2012-03-16
1
204 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
ID: 37731699
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

856 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