Uninstall and re-install/maintenance

Got a problem you cannot solve? Try here.
jcassidy
Posts: 14
Joined: Tue Apr 15, 2014 12:02 pm

Uninstall and re-install/maintenance

Postby jcassidy » Tue May 20, 2014 4:08 pm

Hello,

My installer sets up a MS SQL data base, prompts the technician to acknowledge some release notes and then installs the program. When uninstalling the program, either from the menu option or the control panel it wants to run the MS SQL install portion. I have this section at the beginning of the install so that the software can not be installed if the data base is not installed. I attempted using the following variables: MAINTENANCE, UNINSTALLLINK, REMOVEOLD,NEDSUPGRADE, and NEWINSTANCE.

What I am trying to do is the following:
IF this is an install (not an upgrade, maintenance or uninstall)
RUN the SQL scripts
GET the release notes acknowledgement
INSTALL the program
ELSE
Uninstall the program
END

The above mentioned variables have not assisted me in this goal. I have read through the Pre-Defined Variables list as well which did not give me an answer either. Thanks in advance for any assistance that can be provided.

jcassidy
Posts: 14
Joined: Tue Apr 15, 2014 12:02 pm

Re: Uninstall and re-install/maintenance

Postby jcassidy » Wed May 21, 2014 7:54 am

Hello,

I found in the MSI code snippets under System Information "Does File/Folder Exist". I used this to set a flag telling me weather the program was installed already or not. This has solved my problem.

Thanks
James

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Uninstall and re-install/maintenance

Postby FrancescoT » Wed May 21, 2014 11:38 am

Dear James,

I am happy that you solved.

Anyway, if you check the value of NEDSUPGRADE and MAINTENANCE you can easily know if your package has been already installed.

NEEDSUPGRADE: TRUE if a previous version of the product was found installed using the Windows Installer engine, FALSE otherwise.
MAINTENANCE: Initially TRUE if the same version of the application has been installed before, FALSE otherwise.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

jcassidy
Posts: 14
Joined: Tue Apr 15, 2014 12:02 pm

Re: Uninstall and re-install/maintenance

Postby jcassidy » Thu May 22, 2014 8:24 am

Hello Francesco,

I attempted using NEDSUPGRADE and MAINTENANCE. In fact MAINTENANCE is the variable I chose to set if the file path existed. I am probably doing something wrong but this variable shows up FALSE for me even if the software is already installed.

The NEDSUPGRADE variable reliably shows TRUE if a new build of the installer is used. However if the same installer is used to uninstall or re-install an instance of our software it comes up FALSE.

Please let me know if you would like me to send an e-mail with a copy of my project code in it to you.

Also thanks for always quickly responding and helping people like me out. It is greatly appreciated.

Sincerely
James

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Uninstall and re-install/maintenance

Postby FrancescoT » Thu May 22, 2014 11:19 am

Dear James,

The NEEDSUPGRADE variable reliably shows TRUE if a new build of the installer is used. However if the same installer is used to uninstall or re-install an instance of our software it comes up FALSE.

When NEEDSUPGRADE is FALSE you have to check also the MAINTENANCE variable value.

Example;

Code: Select all

if Variable NEEDSUPGRADE Equals FALSE
  if Variable MAINTENANCE  Equals TRUE
    Comment: SAME PRODUCT VERSION ALREADY INSTALLED
  else
    Comment: NONE INSTALLED
  end
else
  Comment: PREVIOUS PRODUCT VERSION ALREADY INSTALLED
end


Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 129 guests