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

Detect running version


7 replies to this topic

Regulus

Regulus
  • Members
  • 4 posts

Posted 19 February 2002 - 20:11

I've been able to add code to detect if a copy of the application is running during uninstall, but how do I detect if a copy is running during installation?  I thought I'd be able to use the same code, but it gets ignored.

Any ideas?


Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 19 February 2002 - 21:37

Where did you add the code?  Like what function?

If you put in like OnBegin it will get picked up for both install & uninstall.


Regulus

Regulus
  • Members
  • 4 posts

Posted 19 February 2002 - 22:09

In the SetupInstall() function.  

I'll try adding a OnBegin(), but to be perfectly honest, I am learning Install Shield on the fly and borrowing heavily on snippets I'm finding on the net.


Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 19 February 2002 - 23:13

Okay, I'm not familiar with that function, but OnBegin is run everytime, regardless of the scenario, so that will certainly work for you.

Regulus

Regulus
  • Members
  • 4 posts

Posted 19 February 2002 - 23:32

Don't worry, I'm not either :)

I believe the person before me didn't know it that well either and made things up as he went along.  I made the OnBegin and put my code snippet there, but it still does not seem to work correctly.  

Do you have any working code that does this?  or a point in the right direction?


Becky Nichols

Becky Nichols
  • Members
  • 45 posts

Posted 21 February 2002 - 15:43

I have a question.  If the product is installed, why would installation run again?  Are you looking for a different product?

Becky


MKaiser

MKaiser
  • Full Members
  • 88 posts

Posted 21 February 2002 - 17:36

so what you want is the following:

1. grep the process list if aourapplication.exe is runnuing -> see sample section of this site.
2. search for an older version of yourapplication.exe installed -> search former install locations and use VerGetFileInfo

ok..looks like you want to apply a patch somehow. For those purposes we use RTPatch and embed this into an installer for getting the needed information to apply the patch.


Regulus

Regulus
  • Members
  • 4 posts

Posted 21 February 2002 - 19:20

Becky,
I'm trying to protect the end-user from themselves, because someone out there might actually do it.  The problem came up during regression testing and now that it's reared its ugly head, I need to fix it.  So, no I'm not looking for a different product.

MKaiser,
I'll look for the sample section, thanks for the direction.  I'll let you know how it goes.