Jump to content


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.
Photo

remove previous version of MSDE


3 replies to this topic

sean394

sean394
  • Members
  • 7 posts

Posted 12 August 2005 - 08:58

I'm using installshield X version with InstallShield MSI project mode.

Could anyone tell me how to remove MSDE automatically by using installscript?

It doesn't matter what version of MSDE is... I just need to completely remove

MSDE that has been installed.

Please help me.


Thank you.

Edited by sean394, 12 August 2005 - 09:09.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 14 August 2005 - 10:48

I'm not sure if there's a clean way to uninstall MSDE at all.
BTW can you please double check which project type you are using?

sean394

sean394
  • Members
  • 7 posts

Posted 14 August 2005 - 17:04

Basically, we are trying to upgrade an old application.
The old program installs .NET Framework, sqlData, and MSDE.
and the new version(we are developing) has to completely remove the old version
of MSDE, application, sqlDATA etc...

it's like uninstalling or maybe patch to an upgraded version??

what i'm trying to do is..
when user inserts a new upgraded software(which we made), it finds out
if there's a previous version of s/w has been installed or not.
when there's a previous version installed, it automatically uninstalls the old application and installs to a new version.

so what i have done so far...
i made a installscript which removes the old application...



RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
sqKey = "SOFTWARE\\MICROSOFT\\MSSQLServer";
if(RegDBKeyExist(sqKey) >= 0) then
//if value exists, delete
MessageBox("Previous Version of KRCON SQL Server Engine has been found...", MB_OK);
LaunchAppAndWait("C:\\windows\\system32\\Msiexec.exe ", "/X{E09B48B5-E141-427A-AB0C-D3605127224A} ", YES);
Delay(2);
RegDBDeleteKey("SOFTWARE\\MICROSOFT\\MSSQLServer");
DeleteDir("C:\Program Files\Microsoft SQL Server", ALLCONTENTS);
else
//if value doesn't exist
endif;

RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
if(RegDBKeyExist("SOFTWARE\\MICROSOFT\\WINDOWS\\CURRENTVERSION\\UNINSTALL\\{F3E4C3D2-F4C0-4420-9EEA-4D42ABA8959D}") >= 0) then
MessageBox("Previous Version of KRCON Sql Data has been found...", MB_OK);
LaunchAppAndWait("C:\\windows\\system32\\Msiexec.exe ", "/X{F3E4C3D2-F4C0-4420-9EEA-4D42ABA8959D} ", YES);
Delay(2);
else
//if value doesn't exist
endif;

RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
if(RegDBKeyExist("SOFTWARE\\KRCON2004") >= 0) then
//if value exist, delete
MessageBox("Previous Version Of KrCon2004 detected.", MB_OK);
LaunchAppAndWait("C:\\windows\\system32\\Msiexec.exe ", "/X{4B3903E3-3D4E-4FAA-94F9-D94D41225E92} ", YES);
RegDBDeleteKey("SOFTWARE\\KRCON2004");
DeleteDir("C:\Program Files\Krcon", ALLCONTENTS);
Delay(2);
else
//if value doesn't exist
endif;

it all removes old version of MSDE, sqlDATA, old application...etc however,
the problem is old MSDE has same registry key as new MSDE
therefore when program removes old MSDE, new MSDE also recognizes that it doesn't exist.(i'm not sure if you understood...sleep.gif;;)
IT ONLY WORKS WHEN I INSTALL TWICE(first it removes everything, second it installs again)
BUT THIS IS STUPID THING. who would install same application twice ...

Therefore, what i'm trying to do is...

when program removes old version of MSDE and others, it automatically reboots
system. and continues install with new application.
However when i tried to make a reboot system, it didn't get rebooted after removing MSDE.
it installs a whole thing and restarts system.
If there is a way to reboot in the middle of installing application and continues
install a new application, my problem will be solved..


I'm not sure if you have totally understood my questions.
I really tried to explain well...
Please help me.


sean394

sean394
  • Members
  • 7 posts

Posted 18 August 2005 - 02:13

ugh.... it took me really long time to solve this problem.

I just made sql server to stop and remove it using launchandwait

and delete the directory...

i guess this is the easiest way to remove MSDE...

sigh~