Click here to Skip to main content
15,909,530 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi i using C# properties for save something in my program and it has setup file, but when i uninstalled program and then i install it later but the number i saved before uninstall are in the program and now i want when i uninstall the program those saved are going to delete, how can i do it?
and this is properties setting save i using
C#
properties.Setting.Default.a=12;
properties.Setting.Default.Save();

i don't want to it keep save when i deleted program
With Respect
Posted

1 solution

Two ways to do it:
1) Depending on your installation program, add a uninstallation step which removes the settings file. (I have no idea how you are handling install / uninstall so I can be specific)
2) Cheat. Set a "firstrun" flag on installation (or add a temporary file which you then delete on the first run of the app) which sets all settings to their default value when you run your application.
 
Share this answer
 
Comments
Avenger1 11-Nov-14 12:26pm    
i want to do it just on uninstall and i using advance installer, please help me to do it

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900