Thats true. I saw this post at various places. I have already tried the
solutions given there. They did not work. I tried doing it through the
txt file. I also made it an existing file - content type - didn't work.
Do you know another solution?
Thanks,
Avanti
Alvin Bruney [MVP] wrote:
> another one...
>
> --
> Regards,
> Alvin Bruney
> ------------------------------------------------------
> Shameless author plug
> Excel Services for .NET is coming...
> OWC Black book on Amazon and
> www.lulu.com/owc
>
> "avanti" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi,
> >
> > I use ClickOnce to publish and install an application in the company. I
> > have a help file for the same in .chm format. It is part of the C#
> > project as a 'content' file. I also tried as 'embedded resource'. It
> > opens when the help link is clicked. The code looks like:
> >
> > string exeFileName = Application.ExecutablePath;
> > string exeFileNameStub =
> > exeFileName.ToUpper().Replace(@"\Path", @"\");
> > exeFileNameStub =
> > exeFileNameStub.Remove(exeFileNameStub.LastIndexOf('\\'));
> > exeFileNameStub =
> > exeFileNameStub.Remove(exeFileNameStub.LastIndexOf('\\'));
> > exeFileNameStub =
> > exeFileNameStub.Remove(exeFileNameStub.LastIndexOf('\\')+1);
> > string helpFileNameAsPublished = exeFileNameStub +
> > @"Help-TCM.chm.txt";
> > string helpFileName = exeFileNameStub + @"Help-TCM.chm";
> > FileInfo helpFileAsPublished = new
> > FileInfo(helpFileNameAsPublished);
> > FileInfo helpFile = new System.IO.FileInfo(helpFileName);
> > if (!helpFile.Exists)
> > {
> > if (!helpFileAsPublished.Exists)
> > {
> > MessageBox.Show("Help request cannot be actioned
> > because help file is missing - contact support!", "Help file is
> > missing");
> > return;
> > }
> > helpFileAsPublished.MoveTo(helpFileName);
> > Help.ShowHelp(c, helpFileName);
> > }
> > Help.ShowHelp(c, helpFileName);
> >
> > It works fine locally. However when someone installs it from the
> > publishing link, I get the error "Help request cannot be actioned
> > because help file is missing - contact support!"
> >
> > How can I make sure the .chm file is availabel when someone installs my
> > app?
> >
> > Thanks,
> > Avanti
> >