Uninstall - where should Run Program line go?

Got a problem you cannot solve? Try here.
get101
Posts: 48
Joined: Wed May 16, 2007 1:58 am

Uninstall - where should Run Program line go?

Postby get101 » Mon Jul 02, 2007 9:55 pm

When the user uninstalls the application, we need to run this line:
foxhhelp7.exe /UnRegServer

Should this line come before or after the Apply Uninstall line. In the code below I have it after the Apply Uninstall line. But I'm thinking that maybe the program no longer exists there, so perhaps it should come above Apply Uninstall

Can you please confirm which position is better?


Code: Select all

if Variable REMOVE Equals TRUE
  Comment: Uninstall product
  Comment: TO-DO: Insert any additional uninstall commands here
  Apply Uninstall (get result into variable SUCCESS)
  Set Variable PROGRESS to 100
   
  if Variable SUCCESS not Equals Cancel
    Unregister Library $TARGETDIR$\\ctText.ocx
 
    Set Variable INSTALLDIR to $TARGETDIR$
    Convert to Short Path: INSTALLDIR
    Run Program $INSTALLDIR$\\foxhhelp7.exe /UnRegServer
    Comment: End of Installation
     
  end
   
else

swarovski
Posts: 109
Joined: Mon Apr 16, 2007 8:32 pm

Postby swarovski » Tue Jul 03, 2007 2:27 am

I have similar uninstall flow as yours.
For me, i will have to run un-register before "Apply Uninstall".

provided that I am using my own regsvr32 to register my programs.
I did not use self-register (in the IA) coz it is still mysterious for me. sometimes it can register, sometimes not.

swarovski
Posts: 109
Joined: Mon Apr 16, 2007 8:32 pm

Postby swarovski » Tue Jul 03, 2007 2:28 am

one more thing,
if the self-register (in IA) works for your case,
you don't need to unregister by your own.

I believe the MSI will do the un-register prior file deletion.

get101
Posts: 48
Joined: Wed May 16, 2007 1:58 am

Postby get101 » Tue Jul 03, 2007 2:51 am

I am not using self-register.
To confirm, is this the correct sequence?

Code: Select all

if Variable REMOVE Equals TRUE
  Comment: Uninstall product
  Comment: TO-DO: Insert any additional uninstall commands here

   Unregister Library $TARGETDIR$\\ctText.ocx
 
    Set Variable INSTALLDIR to $TARGETDIR$
    Convert to Short Path: INSTALLDIR
    Run Program $INSTALLDIR$\\foxhhelp7.exe /UnRegServer


  Apply Uninstall (get result into variable SUCCESS)
  Set Variable PROGRESS to 100
 
else

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Tue Jul 03, 2007 3:30 am

Yeah, that looks good.

If you call after Apply Uninstall, foxhhelp7.exe will no longer be there.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 82 guests