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 9174193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:42:51+00:00 2026-06-17T16:42:51+00:00

I have this problem. I built an installer for my c# solution, that will

  • 0

I have this problem. I built an installer for my c# solution, that will be placed in a folder with other installation folders and files that are needed to be copied to the installed folder. So that is easy, I just copy them to the folder I create using the folder structure I want by specifying the properties in my visual studio setup project.

Now, I want also that when i run that ‘setup.exe’ that was created by me,certain files from c:/ directory also get deleted (if they were present) from the specific machine on which i am running the setup installer.

I had tried giving command line argument in PostBuildEvent & PreBuildEvent under the properties window of my setup installer project,but its not working. It is deleting those files when i am building the project, rather i want those files to be deleted while running the setup installer file (Setup.exe) which gets creates after project-build.

  • 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-17T16:42:52+00:00Added an answer on June 17, 2026 at 4:42 pm

    You’d be able to write code inside a custom action dll which could do this for you.

    Bear in mind though you may have permissions issues, depending on what privileges the account running the installer has.

    The MSDN has a good example of how to create a custom action dll. It sounds like you might want to:

    • pass the install path into your custom action dll.
    • In the Install overload, write the path into the stateSaver dictionary
    • In the Uninstall overload, read the path from the stateSaver dictionary
    • you’ve now got a path to the install folder, delete away!

    (I’m assuming here you want to get rid of these files on uninstall)

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

Sidebar

Related Questions

I have this problem. I want to build an installer for my c# solution,
I have this problem that I can ref a button for control it. I
Ok, I have looked around and could not find a solution to this problem.
I have a solution file that is built and deployed with the following MSBuild
I have this problem: I want to generate a new source code file from
I have this problem: $id is id for each user $img = 'http://www.somesite.com/pictures/'; $no_img
I have this problem since I'm beginning in OOP programming I want to close
I have this problem when I run SAS 9.2 on the command line on
I have this problem, when I load my form, the validation messages appears in
I have this problem in my SlashDot Menu. I want to change the picture

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.