Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8362173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:52:50+00:00 2026-06-09T11:52:50+00:00

I made small program, which you don’t have to install. So when I want

  • 0

I made small program, which you don’t have to install. So when I want to showHelp, I have to extract it from Resources, this works great, and I save a path to this file.

Then when I call ShowHelp, I pass path to extracted file. In closing event, I try to delete this file, and here is problem.

When I use

Help.ShowHelp(this,pathToChmFile);

it works great, I can delete file, but when I pass even topicId, like this

Help.ShowHelp(this, pathToChmFile, HelpNavigator.TopicId, "10");

then when FormClosing is called, I can’t delete chm file, because it is opened by my process. But why when I show it without topicId, I can delete it?

Because you can’t uninstall my program, I want to clean “rubbish” after myself, but now I can’t…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T11:52:52+00:00Added an answer on June 9, 2026 at 11:52 am

    Creating litter in this scenario is pretty inevitable. You cannot ensure that the file gets deleted. For one, a user typically uninstalls your program when it crashes too much. You cannot extract the resource into the same directory as your EXE, the typical install locations are not accessible to your program for writing. UAC stops this. The user will get a prompt to elevate when she copies your EXE but no such prompt is provided for your own actions. You must extract to %AppData% or the TEMP folder, your user will never find the file back. At least there’s a mechanism to delete old junk from TEMP so favor using Path.GetTempPath().

    For another, the lock is inevitable as well, it is held by another process. The Windows hh.exe program displays the .chm file content. There isn’t anything reasonable you can do when the user exits your program but didn’t close the help viewer first. There’s no reliable way to find the correct instance of hh.exe to kill it, there can be multiple.

    So you’re stuck with the litter, Path.GetTempPath() is least objectionable. Unless you deploy the .chm file in the same directory as the EXE. If not from a .zip file, creating a setup.exe program is quite trivial with a Setup project, don’t skip the one thing that solves your problem and makes your user comfortable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Problem: Have made a small mail program which works perfectly on my developer pc
I have made a program which is a small library operated via software. When
I am studying memory management, and I have made a small program which manages
I have made a demo small program that I want to deliver to my
I've made a small program which has 2 buttons and each does certain thing.
i have made a small opengl program using the d programming language. what i
I have made a small function which should print some InfoPath files. It is
I appologize for this lengthy post. I have made it as small as possible
Ive made a small program in C#.net which doesnt really serve much of a
I made small program to divide large pictures and take part of them. When

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.