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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:15:37+00:00 2026-05-16T21:15:37+00:00

So I have been writing to Environment.SpecialFolder.ApplicationData this data file, that upon uninstall needs

  • 0

So I have been writing to

Environment.SpecialFolder.ApplicationData 

this data file, that upon uninstall needs to be deleted. I am using Innos Setup to build my installer. It works great for me. So my data file hangs out in the above path and I do that cause when I used to try to write it to

Application.ExecutablePath

certain boxes I tested it on would throw a nasty error at me trying to write data there. I do research and somehow its not always writable and its how i came up with the Environment.SpecialFolder.ApplicationData

That is why my data file now resides in the SpecialFolder.ApplicationData. Trouble is if the user uninstalls and reinstalls I need that file gone. It might be a short coming of my knowledge of Innos but I cannot figure out how to know where that file will be to tell innos that.

So then I thought I had a clever solution: Innos can run a file when its done uninstalling, so I had my program create this file “uninstallData.bat” that says:

del "the file in my special folder application data path"

and I wrote it out to drumroll

Application.ExecutablePath 

(yes it was a while in development and I had forgot it was’t doable.)

So of course I am back to square one, I need to write a file to a path Innos knows about {app} and I need it to be able to delete my data file in the SpecialFolder… i don’t care how I do it i just need that file gone.

Are there other Environment. or Application. approches I have missed? Maybe somewhere that is viewable by an uninstaller AND can be written to?

As an aside, I am not sure why my box I develop on can write to the application folder no issue, but it cannot on other boxes… weird.

Any input would be great sorta lost as to how to crack this nut.

  • 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-05-16T21:15:37+00:00Added an answer on May 16, 2026 at 9:15 pm

    The environment location is in the user profile. If there are multiple users on the machine, and they all run the application then a copy of the file will be in each profile.

    The path also depends on the OS.

    Regardless, the current user’s app data location is pointed to by %APPDATA% and %LOCALAPPDATA%. These Windows environment variables should be available within Innos.

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

Sidebar

Related Questions

I have been writing a SOAP client application in C++ on Ubuntu using OpenSSL
I have been writing unit tests using NUnit and Moq with my Silverlight code
I have been writing DLL on C++, that will be use in C#. DLL
I have been writing an application using ASP.Net MVC4, where the majority of the
I have an embedded app that needs to do a lot of writing to
I have been writing some code that detects add and removal of USB devices,
I have been writing a little application where Form1 opens, checks that a config
I have been writing some software that uses a random string to create a
I have been writing linear winforms for couple of months and now I am
I have been writing C++ Console/CMD-line applications for about a year now and would

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.