Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Create and Remove Folder from application Data while installtion and uninstallation of a Program.
 

Create and Remove Folder from application Data while installtion and uninstallation of a Program.

Hi

I am back with a new Post.I have a requirement that i need to create a setup File for my application in such a way that when installation is done

1) It should able to create a Folder inside user's applicationdata Folder with its application GUID Name.

something like {34346736476346763463}


And on the time of un-installion of the Program from add-Remove


1) It should able to delete/remove the folder along with all the sub Folders created and used by application at the time of Functioning.

How can i achieve this in VS 2005 and My SetupFile is an Office shared add-in Project, not a simple setup File.


Thanks

__Das

Dwipayan Das  Wednesday, September 24, 2008 6:57 AM
If you want to create a folder in a Setup&Deployment project that contains no files you need to go to the Propertiews window and set AlwaysCreate to True.
PhilWilson  Friday, September 26, 2008 5:56 PM
How far have you got already? In a setup&deployment project you right-click file system on target machine and thendo an Add Special Folder, choosing User's Application Data Folder, then right click that and add the guid folder name.

PhilWilson  Wednesday, September 24, 2008 11:07 PM

Hi

Thanks for the reply.I have tried that before and it didn't work for me.

Have you done it before ?

If you have done it ,then please tell me the steps to follow .

I am just a kid in C#.....

Thanks

__Das

Dwipayan Das  Thursday, September 25, 2008 12:16 PM
None of this is C# - this is just using the IDE in the Setup&Deployment project, the Add Special Folder I described, and then browse to your Dll and add it to the custom folder. So that's the right thing to do, so when you say "it didn't work" what exactly does that mean?

PhilWilson  Thursday, September 25, 2008 10:38 PM

Hi

Actually i don't want to copy my DLL to User's Application Data\GUID Folder.

1) I am downloading and running a Activex (CAB File Which contains the setup.msi) through my JSP using <Object>

tag.

2) When the setup is installed it has to create a Folder inside user's Application Data directory with the GUID Name.

3) My activex will download some DHTML Files and javascript files from serevr to the created GUID Folder which can be used in future for offline works.

4) While uninstallion of the Activex from Add-remove it should remove the GUID Folders and the sub Folders inside it.

Thanks

__Das

Dwipayan Das  Friday, September 26, 2008 8:52 AM
If you want to create a folder in a Setup&Deployment project that contains no files you need to go to the Propertiews window and set AlwaysCreate to True.
PhilWilson  Friday, September 26, 2008 5:56 PM

Hi PhilWilson

Thanks for the valueable reply.It worked for me and creating the GUID Folder inside User's ApplicationData at the time of installation and removing the Folder as well at the time of intsallation.

But after installation, my Application creates some subFolders like HTML,JavaSCript,CSS inside the created GUID Folder and stores some HTML,JavaScript,css Files .

At the time of uninstallation,i need to remove all the subFolders,Files inside the Created GUID folder,which is not happening in my case.My application is unable to delete those files and folders.

Thanks

___Das

Dwipayan Das  Monday, September 29, 2008 6:18 AM

Hi Philwilson

I posted a reply to your sugesstions regarding creating the folder into user's application data folder at the time of installation of my Program.

Now as per your suggestion , it is creating the Folder inside the appliactionData Folder , but its unable to delete the folder while uninstall , if it has created sub folders and Files inside the Created Folder.)

Can you please look into the issue i am facing.

I think we are just missing something there.

Anysugeestion will be a great help to me.

Waiting for your reply................

Thanks

_Das

Dwipayan Das  Wednesday, October 01, 2008 9:37 AM

The install won't remove that folder because it contains application-created data files. The MSI setup didn't create those, so it won't remove them. I don't know the design or requirements of your app, so it's not clear to me why you're doing all this in a custom folder if they are actually temporary files that you could put in some real temp folder.

You'll have to remove those files and sub-folders with an uninstall custom action.

PhilWilson  Thursday, October 09, 2008 5:20 PM
dear Phil Wilson,
What kind of expert are you? We are searching solutions, not your lazy answers. If you dont want give answers dont do. Have u develope an uninstaller at least one
time?? The problem we have is that we need the custom action of uninstall DELETES AN SPECIFIC FOLDER. which are the steps for do that??

I can go to myInstaller => Custom Actions => Uninstall and after that what??

Please give steps and good answers, not things like "You'll have to remove those files and sub-folders with an uninstall custom action." (how u do that??)
JUANONCHO PICHIN  Wednesday, August 19, 2009 9:05 PM
PhilWilson  Wednesday, August 19, 2009 10:55 PM
Thanks, answers like these can help people now.

Best Regards,

Alberto
JUANONCHO PICHIN  Thursday, August 20, 2009 2:49 PM

You can use google to search for other answers

Custom Search

More Threads

• Windows Deployment Project
• How to make my output installer a .exe installer from VS2005?
• Problem with the Clickonce Deployment
• how to deploy my vs2005 projects in the old way
• click once deployement for Visual Studio .Net 2003
• WinForm controls in IE stopped working after installing Framework 3.5 SP1
• Downloading and Installing a Clickonce Application programmatically through a different program
• How to get VS.NET to deploy a DLL into the Glocal Assembly Cache?
• How would ClickOnce handle installing new version of framework?
• Setup Project, Custom Actions Editor