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

Check for Files Locked


2 replies to this topic

Xitch13

Xitch13
  • Members
  • 134 posts

Posted 28 January 2003 - 18:11

Hey there;

My field techs requested that I let them know if a Patch would cause a reboot before the transfer of files.  That way they could either go in and kill any loose threads (from clients holding onto a resource) or decide to patch later when the server might not be as mission-critical.

So, thinking that I'm pretty darn smart, I created a list with all the files in the Patch and run through them through a query to determine if any are Locked.  If so, I throw up a dialog letting the user know what file(s) are locked and giving them a choice to reboot.

However, not all the files in the Patch get replaced every time.  If the current version is the same as the new version there is no need.  Therefore, sometimes I report that a reboot will be necessary when it really isn't.

What I really need to do, is to compare the Patch version to the current version of each file and then test for file locked.  I know IS does this at file transfer time, but then it's too late to cleanly abort the installation.   Also, the list that I create is just a manually updated string list, not an actual reference to the file in the Patch, which means version numbers would need to be updated manually too (yech!;).

Therefore what I need is

A) a way to reference the actual files in the Patch
B) Check to see if the file is present (different types of Server and/or Clients)
C) Check the Patch version vs the Current version
D) If it's going to be replace, check them for FileLocked condition


I can do B & D, but A & C have me stumped.


Thanks for any help
There is great chaos under heaven, and the situation is excellent. (Mao Tse Tung)

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 29 January 2003 - 01:49

If you modify your media so as to not compress your file groups into CAB files, then you should be able to immediately get a raw file listing and use the built-in VerGetFileVersion & VerCompare  functions to determine which files are out-of-date.

You can still use the media's single-executable option or PFTW to package your install.  I think this will even give you some compression, but I'm not certain of that.

I'm sure you're wondering where these raw files will end up once the setup is launches.  Well I'm not totally sure of the answer to that question, but if it's somehow packaged, then it will probably be a subdirectory of SUPPORTDIR.  Otherwise it could be somewhere in SRCDIR or SRCDISK.  They are only so many places where they could be found.  :)


user posted image

Xitch13

Xitch13
  • Members
  • 134 posts

Posted 29 January 2003 - 16:30

Thanks for the help!  

I wish I had thought of that :(

Again thanks for the help Taco
There is great chaos under heaven, and the situation is excellent. (Mao Tse Tung)