Hi All,
I found some postings regarding this and I made some changes to get it working for me with IS7 and a single setup.exe install - but I'm not quite there. I'd appreciate some help with this.
Here's what I have so far:
//Check if already installed and grab the uninstall string
nType = REGDB_NUMBER;
szUninstValue = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\InstallShield_{BAA0DA0F-445F-4C55-9900-0EC9D15CCFCF}";
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
// Retrieve the uninstallation string.
if (RegDBGetKeyValueEx(szUninstValue, "UninstallString", nType, svNumValue, nvSize) < 0) then
goto Dlg_SdWelcome;
endif;
//Ask User if they want to uninstall or Quit
// Display the AskYesNo dialog box. The default is set to Yes
SetDialogTitle(DLG_ASK_YESNO, "@bc already installed");
if (AskYesNo(" You already have @bc installed." +
"Do you want to uninstall your current " +
"version and then continue? Selecting No will quit Setup", YES) = NO) then
abort;
endif;
listID = ListCreate ( STRINGLIST );
StrGetTokens ( listID , svNumValue , "-" );
nresult = ListGetFirstString ( listID , szstring1 );
while (nresult != END_OF_LIST)
if (szapp = "") then
szapp = szstring1;
endif;
nresult = ListGetNextString ( listID , szstring1);
szcmd = szstring1;
endwhile;
if (LaunchAppAndWait (szapp, "-" + szcmd, WAIT) < 0) then // launch unInstallShield
MessageBox("Failed to Launch unInstallShield", SEVERE);
endif;
Dlg_SdWelcome:
szTitle = "";
szMsg = "";
nResult = SdWelcome(szTitle, szMsg);
if (nResult = BACK) goto Dlg_SdWelcome;
szTitle = "";
svName = "";
svCompany = "";
etc.....
Problems:
1. DLG_ASK_YESNO never appears
2. I want the uninstallation to be silent - I don't want the Maintenance dialog to appear with choices.
3. After uninstallation I want setup to continue with Dlg_SdWelcome but instead setup just ends.
Any help greatly appreciated.
Regards
Andrew
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
How to test if app already installed. - repost
Started by
agaskell
, Apr 18 2002 17:36
1 reply to this topic
Posted 24 April 2002 - 20:33
Moved to proper forum
Stefan Krüger
InstallSite.org twitter facebook