Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Uninstall an NT Service


3 replies to this topic

sakbuddika

sakbuddika
  • Members
  • 8 posts

Posted 20 May 2002 - 16:46

I used a DLL to create an NT Service. But at the un-installation time the service is not removed. Any suggestion for this urgent issue is highly appreciated; My DLL has following methods.

DWORD InstallService (LPCTSTR, LPCTSTR,LPCTSTR, BOOL)
DWORD UninstallService(void)
long UninstInitialize(HWND , HINSTANCE , long )
long UninstUnInitialize(HWND , HINSTANCE , long )

discomonger

discomonger
  • Members
  • 16 posts

Posted 20 May 2002 - 18:49

Put a call to your uninstall function from the dll in the OnMaintUIAfter function.  If you allow the repair action you'll have to check to see if the user chose Repair or Remove and only call your dll if it's a Remove.

Hope that helps,
disco

sakbuddika

sakbuddika
  • Members
  • 8 posts

Posted 22 May 2002 - 06:58

Thanks disco, for replying but what will happen to the UninstInitialize() and UninstUnInitialize() functions those will not be called, right?

venki_1

venki_1
  • Members
  • 8 posts

Posted 28 May 2002 - 10:15

Hi,
Check the sample codes in the Left pane in this page.
IS5/6 Samples -> NT Services
I guess this may be useful
Thanks,
Venkat