Open the application folder, Hal.

Some applications *cough ClickOnce cough cough* hide in difficult-to-find folders, with auto-generated paths that include GUIDs.

Here’s an easy way to open the application folder, and also the config file. And the local application data folder, because of course you’re using that for application logs…?

private void linklblOpenAppFolder_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
    {
        System.Diagnostics.Process.Start(
            System.AppDomain.CurrentDomain.BaseDirectory);
    }

private void linklblOpenConfigFile_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
    {
        System.Diagnostics.Process.Start(
            System.AppDomain.CurrentDomain.SetupInformation.ConfigurationFile);
    }
private void linklblOpenLocalAppDataFolder_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
    {
        System.Diagnostics.Process.Start(
            System.Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
    }

This entry was posted in C#, Programming. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.