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

Problem in Upgrade with CA


7 replies to this topic

Mr.B

Mr.B
  • Full Members
  • 30 posts

Posted 23 November 2004 - 17:28

Hello All

I have a strange problem when I try to Upgrade my application.
I have a applicaiotn that copies some file to my HDD and then start a sevice.
when I uninstall the application it deletes the files and remove the service.
(installation and removal of the service is done with Custom action)
Now , I updated some of my files and my service file and I want to upgrade the application. I am using a major update.
when I install the new application the service of the previous application is still on.
and when the new application try to install it again I get an exception.

Maybe someone know who to fix this problem casue i am really frustrated about it

unsure.gif unsure.gif

thanks a lot

KapilMarwah

KapilMarwah
  • Members
  • 32 posts

Posted 23 November 2004 - 17:34

What kind of upgrade are you doing and where have you sequenced the RemoveExistingProducts action. You must stop the service before installing the new file (associated with the service).

Kapil

Mr.B

Mr.B
  • Full Members
  • 30 posts

Posted 23 November 2004 - 21:17

I am a little newbie in the MSI stuff so these are the details :

This is a Major Upgrade. ( I changed the package and product code but not the
upgrade code ).

I dont know how to sequence the RemoveExistingProducts action.
I will be more than happy if someone explain me how to do it.

I want to stop the service at the beggining of this operation

But i really dont know how to do it

please help me ste by step

Thanks again





KapilMarwah

KapilMarwah
  • Members
  • 32 posts

Posted 24 November 2004 - 09:55

Ok, firstly if you want to completely uninstall the previous version of your product and then install the new version then sequence th RemoveExistingProducts action after the InstallValidate action (use the InstallExecuteSequence table to do it).

This will remove the previous product completely before installing the new version (and hopefully remove the service too.... smile.gif If there is a service control or Custom Action authored to stop the service during uninstall )

Now when the newer version installs it'll be OK as the service has been stopped and removed by the uninstall of the previous version...

Hope this works.....

Kapil

Mr.B

Mr.B
  • Full Members
  • 30 posts

Posted 24 November 2004 - 10:36

Thanks. I'll try it ASAP

But I have one more question.
lets say that I want to delete all the files from the previou version except
the file with .CFG extention
can I do it ???
If yes, Please tell me how


Thanks again

mayur

mayur
  • Members
  • 12 posts

Posted 25 November 2004 - 06:25

Hi,

One way you can achieve this by writing a vbscript which will copy your .CFG file from its original location to the t %temp%.

This custom action needs to be placed before RemoveExisting CA with condition "UPGRADE_1"(means when previous version found).

Then write one more vbscript to copy that file from temp to your [INSTALLDIR]
or wherever u want.
Placet this CA in deferred just before InstallFinalise.

Edited by mayur, 25 November 2004 - 06:27.


Mr.B

Mr.B
  • Full Members
  • 30 posts

Posted 25 November 2004 - 08:15

Ok I think I am beggining to understand the concept of working with Windows Installer but still beacuse i'ts new to me i have some things that i dont know
so please help me.

1. How do I sequance the RemoveExistingProducts and where ??
2. where can I run a code that will execute before InstallFinalise ??

thanks again

mayur

mayur
  • Members
  • 12 posts

Posted 25 November 2004 - 10:20

1. How do I sequance the RemoveExistingProducts and where ??
Place RemoveExistingProducts action after Installvalidate and before InstallInitialise

2. where can I run a code that will execute before InstallFinalise ??
Vbscript:
----Place Vbscript to copy previous version files to temp before RemoveExistingProducts CA.

----Place another vbscript to copy all files from temp to your application folder in deffered Execution before InstallFinalise.


But if u r using any property in deffered then u have to do some more work using "CustomActionData" property becoz properties are not accessible in deffered execution.

Edited by mayur, 25 November 2004 - 10:25.