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

How to save data from previous installed version


7 replies to this topic

Alny

Alny
  • Members
  • 5 posts

Posted 17 January 2005 - 15:16

I need to save some data from previous installed version (for example list of users), and insert them into new (installed) version.
Of course I want to do it during new version installation. But problem is that standard Custom Action "RemoveExistingProducts" in InstallExecuteSequence table goes before any user-defined custom action, and I can't save previous data in my custom actions, because they are already uninstalled.
When I move RemoveExistingProducts after InstallFinalize action, as recomended on Microsoft Site, it uninstalls (deletes) just installed application files smile.gif.
When I put RemoveExistingProducts just before InstallFinalize I get an error
CODE

DEBUG: Error 2613:  RemoveExistingProducts action sequenced incorrectly.
The installer has encountered an unexpected error installing this package. This
may indicate a problem with this package. The error code is 2613. The arguments
are: , ,

So the question is- how can i save previous data?


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 18 January 2005 - 09:30

Why don't you sequence your custom action before removeExistingProducts?

Alny

Alny
  • Members
  • 5 posts

Posted 18 January 2005 - 10:39

Because I got an error
CODE

DEBUG: Error 2613:  RemoveExistingProducts action sequenced incorrectly.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 19 January 2005 - 10:17

I didn't talk about moving thr removeExistingProducts action.
QUOTE
But problem is that standard Custom Action "RemoveExistingProducts" in InstallExecuteSequence table goes before any user-defined custom action

That's not true. You can sequence custom actions before RemoveExistingProducts by giving them a lower sequence number.

Alny

Alny
  • Members
  • 5 posts

Posted 19 January 2005 - 10:50

Yes, but when removeExistingProducts located at standart place: between InstallValidate and InstallInitialize, and i sequence custom actions before RemoveExistingProducts, I get another error
CODE
DEBUG: Error 2762:  Unable to schedule operation. The action must be scheduled between InstallInitialize and InstallFinalize.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 19 January 2005 - 10:51

Make sure your custom action is of type Immediate, not Deferred.

Alny

Alny
  • Members
  • 5 posts

Posted 19 January 2005 - 12:02

Thanks. Тhe problem indeed was related to custom action type (it was Deferred, not Immediate)

Rimidalv Veigro

Rimidalv Veigro
  • Full Members
  • 1 posts

Posted 23 December 2009 - 15:01

I have the same problem.
But if I run the installer with a non-admin user, the Immediate action cannot modify registry keys. Only actions in system context can do that. Immediate actions in system context are not supported.
I have to puct the actions in that order:

.....
InstallInitialize
MyCustomAction
RemoveExistingProducts
......

MyCustomAction changes some registry keys.