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

XCopyFile Placement


3 replies to this topic

lynn_

lynn_
  • Members
  • 3 posts

Posted 01 April 2004 - 23:48

Hi All,

I've got a Dev9 project. It's got one component, "Program". I've written some script that does a copy of two different directories:

- from the SRCDIR\dir1 to TARGETDIR\dir1 and
- from the SRCDIR\dir2 to TARGETDIR\dir2

Currently, I'm doing this in Program_Installing() event -- but, I just realized that this may be the wrong place to be doing it, because, in the case of an Upgrade, Program_Installing() doesn't seem to get called! Where would you recommend moving this code to, so that it runs regardless of new install or upgrade?

Another thought -- maybe I should disable upgrade altogether? (Although it seems like I should be able to use it, as long as I put the code in the correct place.)

- Lynn
--
Lynn Crumbling
lcrumbling@adsi-cni.com


KathyMorey

KathyMorey
  • Full Members
  • 111 posts

Posted 02 April 2004 - 15:24

OnMoving and OnMoved always get called, so you could put the code in one of them. Note, though, that these events also get called during uninstalls, so you'll have to condition the code not to execute then.

HTH

Kathy
Kathy Morey
Synergy Software Engineer
ProfitStars, a Jack Henry Company
kmorey@profitstars.com

lynn_

lynn_
  • Members
  • 3 posts

Posted 02 April 2004 - 15:26

Thanks, Kathy...

You wouldn't happen to know what that conditional code would look like, would you? Is there some global flag that is set on uninstall?

- Lynn

lynn_

lynn_
  • Members
  • 3 posts

Posted 02 April 2004 - 15:58

I think I'll answer my own question...

I suppose I can use MsiGetProperty() and test for something like...

if (UPGRADINGPRODUCTCODE) or (Not Installed) or (PATCH) then
// run code
endif;

.. Right?

- Lynn