Click here to Skip to main content
16,018,264 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working on service(CATlServiceModule).
This service stores the data in buffer.
1) Application(like notepad, wordpad etx) that is in process or we start 2) The URL (facebook.com, timesofindia.com etc)that is currently open

if the time of application is exceeds the time limit that is given in application than application store "time spanning and details" in buffer in XML format and after every 30 min it create an XML, Zip it and send it to server.

This is what my application is doing. Setup is created by .Net team with WIX.
One bug is found during uninstallation is that when setup uninstall the service.During uninstallation i write the code that create XML for the remaining buffer and zip it.
The setup will take care of sending the zip to server.but setup will get message of uninstall first and it start sending the file.
The files are created after setup send the file so all the folders are not deleted during uninstallation.

Is there any way that i can wait when uninstallation done all the process in my code.

If anyone want to see source code than i will paste here.
Thanks in advance.

Update:

Hi Venkatesh, FYI The issue is resolved now. I don't send the file to server during uninstallation, Just delete the file in my code. Thanks for your support :) - Shilpi Boosar
Posted
Updated 3-Jan-11 19:26pm
v5

1 solution

The Uninstaller would take care of uninstalling the files which are installed.

As you said the zip file is created by you while uninstalling the application which is not the part of installation. So, it will not delete it.

Solution 1:

Add a dummp zip file of the same name along with the installation. Now uninstallation will automatically take care of uninstalling.

Solution 2:

If the main application is .NET application, write a class deriving from Install.Installer (its a abstract class) and write your custom actions.

Add Custom Action in Setup Project.

Solution 3:

You said, you will Zip the file. You also write code to send and delete the file.
 
Share this answer
 
Comments
ShilpiP 29-Dec-10 2:59am    
Hi Venkatesh,
Thanks for your answer :)
Yes very true but the code is written in setup that send these files to server and delete the files during uninstalltion. Setup will take care of it.
Solution 1:
Not possible the name of zip file is not the same always because n number of zips are created.
Solution 2)Main application is written in win32. IN setup the code during uninstalling the service is written "uninstall" and property is set as wait.(I dont know the property wait here :()
3) Yes that code is written in my code also. I did the same thing but failed when i send logs to server.SendLogToServer is done via service and thats why the code is writtern in server.

One think i do is there is SERVICE_STATUS function that have one value dwWaitHint. I set this value to dwWaitHint = 30000, but now the service is uninstall and the status is on services.msc is started and the service is deleted :). Do you have any other solution ???
again thanks for the reply .
Venkatesh Mookkan 29-Dec-10 3:06am    
3) Yes that code is written in my code also. I did the same thing but failed when i send logs to server.SendLogToServer is done via service and thats why the code is writtern in server.

As uninstall action will delete the Service, "SendLogToServer" will not work. Instead, write the sending files in Xml Creation itself
ShilpiP 29-Dec-10 3:44am    
This i done before deleting the service but i failed.
Venkatesh Mookkan 29-Dec-10 3:49am    
Write a small .NET Console app to send email. Install along with the main application. Call it when email is to be sent. Delete the files once it is sent. Put some messages (for testing purpose).

I have a strong feeling, that the delete logic you have written if failing. Try adding some messages in there.
ShilpiP 29-Dec-10 4:56am    
You didnt get my point i think. During uninstallation when service uninstall the setup get message first that service is uninstalled and the setup done its next task but the service is creating setups and all. thats why the zip files created by service is not installed.
I am a vc++ developer not .net developer :). The setup is created in .net only. :)

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