[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Pocket PC Uninstall_Init functions not called second time

Posted on 2004-08-23
12
Medium Priority
?
268 Views
Last Modified: 2013-12-27
I have a PocketPC logon replacement app developed in eVC++3 which is installing and working fine.

However, when it is uninstalled it needs to check if it is still active and prompts the user to disable it. i.e:

codeUNINSTALL_INIT Uninstall_Init(HWND hwndparent,LPCTSTR
pszinstalldir)
{
  if (still active)
  {
    MessageBox(hwndparent, _T("Still active."), _T("App"), MB_OK);
    return codeUNINSTALL_INIT_CANCEL;
  }

  // do clean up ...
}

This works fine the first time. But if you click the 'Remove' button again in Remove Programs, it goes ahead and removes the whole app anyway without calling the Uninstall_Init function again?

Is this by design or I am missing something?

Appreciate any help!

Thanks,


Colin
0
Comment
Question by:cdmackie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
  • +1
12 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 11871243
shouldnt you exit the sub and not cleanup if its still active?
0
 
LVL 1

Author Comment

by:cdmackie
ID: 11871574
Not sure what you meant, but if it's still active it does exit....may be my pseudo-code isn't too clear...


codeUNINSTALL_INIT Uninstall_Init(HWND hwndparent,LPCTSTR pszinstalldir)
{
  if (cannot be uninstalled yet)
  {
    MessageBox(hwndparent, _T("Still active."), _T("App"), MB_OK);
    return codeUNINSTALL_INIT_CANCEL; // **** return code to say "cancel the uninstall"
  }

  // else, if okay to uninstall...

  // do clean up of other stuff...

  return codeUNINSTALL_INIT_DONE;
}
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 11871632
Is your program still running when you run it again in the background. (alof of ppc apps are still running even though you closed it)
0
What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

 
LVL 1

Author Comment

by:cdmackie
ID: 11872161
Thanks for the comment.

It's a logon replacement app (implemented as a Control Panel applet) so it is started when the PPC is turned on anyway - and presumably always running.

When the uninstaller loads the file and calls the functions, I just don't see why it doesn't call them again when you click 'remove program'? Plus it doesn't really have a main window so there would be no way to 'close' it down.

0
 
LVL 48

Expert Comment

by:Mikal613
ID: 11872334
Whats the code for the Remove button?

And how do you check id you can remove the button?

The problem has to be there
0
 
LVL 1

Author Comment

by:cdmackie
ID: 11872646
The remove button is the 'Remove Program' in Control Panel->System->Remove Programs - not my code! The PPC application manager then calls my custom setupDLL for the functions, e.g. Uninstall_Init().

It calls my function the first time, when I return codeUNINSTALL_INIT_CANCEL to abort the uninstall.

If you click 'Remove Program' again, it doesn't call the function but just deletes the application files.

Thanks,


Colin
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 11872692
did you try upgrading to evc 4.0 SP2
0
 
LVL 23

Expert Comment

by:chensu
ID: 11873448
Uninstall_Init() is called only before the uninstallation begins. After the uninstallation completes, Uninstall_Exit() is called.
0
 
LVL 1

Author Comment

by:cdmackie
ID: 11874317
There are compiler errors with eVC 4 which are being looked at separately, but I don't see why that should matter, it's still just a DLL that isn't being called.

chensu, the return code for Uninstall_Init() is to cancel the uninstall so the program is left in the Programs list. But when the uninstall is done again, it doesn't get called again. Is that by design?
0
 
LVL 23

Expert Comment

by:chensu
ID: 11874780
Now I see what you mean. It sounds like a bug. Try writing a minimal program to reproduce the problem, then send it to Microsoft to see what they say.
0
 
LVL 1

Accepted Solution

by:
nickycollins earned 2000 total points
ID: 11885628
There is a known bug in PPC 2003, see other references:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=u8BXKnucDHA.2372%40TK2MSFTNGP09.phx.gbl&rnum=1&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26q%3Duninstall_init

It is logged with Microsoft but with no workarounds yet.

Sorry!


nicky
0
 
LVL 1

Author Comment

by:cdmackie
ID: 11885652
Humm..ok thanks for the help.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Progress means simplifying, not complicating. Bruno Munari Preface How to detect the name of the internal storage or an SD-card on Windows Mobile device from the desktop application? I got this question, when I was working on a PC applicati…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question