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