cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
haraya
Level 2

How to auto start the install process after uninstall?

Hi,

I am new to IS2008. When performing a software upgrade, after uninstalling the previous version, I would like to automatically start the install process without double clicking again setup.exe. Any ideas on how to achieve this?

Thanks!
Labels (1)
0 Kudos
(2) Replies
Reddy611
Level 6

HI,

are you storing the existing installed product code in the registry Y/N ..?

IF yes get the registry value useing this code and uninstall the product in silent mode.

RegDBSetDefaultRoot (HKEY_LOCAL_MACHINE);
szKey = PRODUCT_KEY;
szName = "Productcode";
nvType = REGDB_STRING;
RegDBGetKeyValueEx (szKey,szName,nvType,svValue,nvSize);

if svValue != "" then
szProgram = "msiexec.exe";
Uninstall = "/x ";
Suninstall = " /Quiet ";
CmdLineValue = Uninstall + svValue + Suninstall;
//CmdLineValue = Uninstall + svValue ;
//MessageBox(CmdLineValue,INFORMATION);
LaunchAppAndWait(szProgram,CmdLineValue,LAAW_OPTION_WAIT);
return 0;
endif;


IF NO,after installing the product in the registry here you will get it.HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
useing the above code ..you can uninstall the product.

Steps to Uninstall the application in silent mode.

1)after welcome dialog create a custom daillog with two radio butoon.

one radio :upgrdare the installion with reataining old configuration
two radio :remove all the componentes with out retaining the old configuration.

after this show EULA dialog to continue the installation.

i think this information will help ful to you.

Regards
Reddy.c
0 Kudos
haraya
Level 2

Thanks, I'll work on that 🙂

As for your question. No, I am not storing the installed product code in registry.
0 Kudos