Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / October 2007

Tip: Looking for answers? Try searching our database.

ClickOnce Installation - Finding 'data' directory

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jd - 26 Oct 2007 15:56 GMT
Hi, we're trying to get to grips with using ClickOnce installers and
are having some problems. Once installed, the majority of the
application will reside in the following directory:

C:\Documents and Settings\<username>\Local Settings\Apps\2.0\<x>\<y>
\<z>

where <x>, <y> and <z> are seamingly random strings. The installation
also keeps some files in a 'data' directory:

C:\Documents and Settings\<username>\Local Settings\Apps\2.0\Data\<x>
\<y>\<z>\Data

where <x>, <y> and <z> are again, seamingly random strings, which
differ to the path to the executable.

Whilst it is possible to get the first path relatively easily from
looking up the current directory, I've not found a way to obtain the
path to the 'data' folder.

Whilst searching I found one recommendation which claimed one could
use the following:

(string)AppDomain.CurrentDomain.GetData("DataDirectory")

However, this always appears to return null.

Can anyone shed any light on how one can obtain the data directory
path?

Many thanks in advance.

JD
Mel - 26 Oct 2007 18:53 GMT
I use this with ClickOnce

using System.Deployment.Application;

public static string GetDataDirectory()
{
    if (ApplicationDeployment.IsNotworkDeployed)
   {
       return ApplicationDeployment.CurrentDeployment.DataDirectory;
    }
    else
         Application.StartupPath;
}

> Hi, we're trying to get to grips with using ClickOnce installers and
> are having some problems. Once installed, the majority of the
[quoted text clipped - 29 lines]
>
> JD
Gigasoft - 26 Oct 2007 21:18 GMT
Hi,

I've heard this has been helpful learning about Click-Once.

http://www.code-magazine.com/Article.aspx?quickid=0611041

best regards,

Robert Dede
Gigasoft, Inc.
www.gigasoft.com

> Hi, we're trying to get to grips with using ClickOnce installers and
> are having some problems. Once installed, the majority of the
[quoted text clipped - 29 lines]
>
> JD

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.