0

I am new to the world of Windows Mobile app development and C++. I have created CAB file to install my Window Mobile application on device. However at the time of installation I should be able to check if application is already installed. If yes, stop the application if it is in running state, then un-install it before proceeding with current installation.

I suppose this would be done with the help of Setup.dll file. I need help to get above mentioned scenario working. All posts related to Setup.dll that I came across only speak about its basic creation as shown here https://msdn.microsoft.com/en-us/library/aa924308.aspx?f=255&MSPPError=-2147217396

Aum
  • 293
  • 3
  • 17

1 Answers1

0

You need to follow the ce_setup skeleton and implement the default ce_setup functions.

In the codeINSTALL_INIT Install_Init( HWND hwndParent, BOOL fFirstCall, BOOL fPreviouslyInstalled, LPCTSTR pszInstallDir ) function implement your 'un-install'.

For example create a function that checks if a process is running and kill it. Remove App Counter for the application. Etc., etc. This function can nearly use everything you can use normally. Possibly start with an application that does the un-install and then use the same code in setup.dll.

Finally you need to add the setup.dll to your cab.

josef
  • 5,951
  • 1
  • 13
  • 24