Solved

Using a variable to store files in the Application Directory?

Posted on 2014-10-15
2
94 Views
Last Modified: 2014-10-16
My application has functionality where it can store PDF files within a directory called "Certificates" somewhere inside the App directory structure. My question is, where would be the best place to store "Certificates" that will always be where it should be regardless of where on a drive the application is installed? Also, how do I access that directory within my VB.Net code. I've done this once before but it's been awhile and I don't remember what the object is to accomplish this.

Thanks!
0
Comment
Question by:BlakeMcKenna
2 Comments
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 500 total points
ID: 40383330
You can use Application.StartupPath within your application to determine the path where your executable is on the drive, then your would append the string "\Certificates" to it to get your path for where to store your PDFs.
0
 

Author Closing Comment

by:BlakeMcKenna
ID: 40384117
Thanks Paul...that's what I was looking for.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

911 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

20 Experts available now in Live!

Get 1:1 Help Now