Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Files in Use

  1. #1

    Default Files in Use

    Sometimes when I run an installation to upgrade a system, a target
    file is in use. When the installation ends, it asks to restart the
    machine, so that it can get exclusive rights to that file.

    However, I can't always run the install on the server, in which case
    the reboot trick won't work.

    When I encounter this problem, I install it to a separate directory,
    then copy the files in with Windows Explorer. It complains about the
    specific files with access problems. This is a hassle. <g>

    Is it possible to see a list of files that caused conflicts, so that I
    can get a better idea of who's got what open? Then I can find them
    and kick them out, so that I can rerun the install.

    Mike Hanson
    www.boxsoft.net

  2. #2

    Default Re: Files in Use

    HTH..

    Jane Fleming
    Attached Images Attached Images  

  3. #3

    Default Re: Files in Use

    Thanks, Jane. That should do the trick.

    What would be better is an option to have it warn which files are in
    use before proceeding with the installation, with an option to print
    and/or abort. <g>

    Mike Hanson
    www.boxsoft.net

  4. #4

    Default Re: Files in Use

    Mike,

    > Thanks, Jane. That should do the trick.
    >
    > What would be better is an option to have it warn which files are
    > in use before proceeding with the installation, with an option to
    > print and/or abort. <g>

    And why don't you make use of this option <g>.

    See "Check In-use Folder Tree..." function. The variable %_SB_RETURNEX%
    returns a list of filename(s) in use. You can then display this in a list
    box.

    But it's still possible that "something" locks files after this check. For
    example, a anti-spyware or anti-virus product. Then Windows will again
    queue the file for "replace at reboot".

    And it's not a trivial task to check for in-use files before the real
    installation when you have a complex deployment strategy with lots of
    If..Then..Else Statements because you have to "mirror" this installation
    logic into your in-use check strategy. A nearly impossible mission.

    Friedrich

  5. #5

    Default Re: Files in Use

    Thank-you, Friedrich. I realize that it would be impossible to cover
    all contigencies, and I really appreciate what I've got.

    Mike Hanson
    www.boxsoft.net

  6. #6

    Default Re: Files in Use

    Ok, I'm using that function after selecting the destination directory.
    If it returns 1, then I display %_SB_RETURNEX% in a message box with
    OK+Cancel. That's probably sufficient.

    BTW, I'm seeing the pipe symbol instead of line breaks in the message
    box. Is there an option to change that behavior?

    Mike Hanson
    www.boxsoft.net

  7. #7

    Default Re: Files in Use

    Mike,

    > Ok, I'm using that function after selecting the destination directory.
    > If it returns 1, then I display %_SB_RETURNEX% in a message box with
    > OK+Cancel. That's probably sufficient.
    >
    > BTW, I'm seeing the pipe symbol instead of line breaks in the message
    > box. Is there an option to change that behavior?

    This is the expected behavior. It returns a "List" that can be 1.) directly
    displayed in a List Box Dialog (or list control in a Custom Dialog) -or- 2.)
    processed via the "Handle String Operation: List Item".

    And what you can do is to convert the pipe symbol to another character.

    For example:

    ! Test List
    Set Variable %LISTITEM% to "|1|2|3|4"
    ! Convert | to ;
    Set Variable %LISTITEM% to FUNCTION:Replace(%LISTITEM%, |,

    Does this help?

    Friedrich

  8. #8

    Default Re: Files in Use

    Every time I have to add dialog boxes, I feel a bit of trepidation. I
    do it so seldom, that I forget many of the idiosynchracies from one
    time to the next. <g>

    In this case, after the select the destination folder, I prepare a
    series of display variables for the upcoming "Ready to Install"
    window, then issue the Refresh Next Dialog so that it's ready.
    However, now I'm injecting another dialog with a list of files. I'm
    hiding or unhiding that, depending on whethere there are files in use,
    so I can't be sure it will display. Is there an optimal place to
    position "Refresh Next Dialog", or should I just liberally sprinkle it
    here and there?

    Or is there a "Refresh all upcoming dialogs" or equivalent?

    BTW, I'll never make sense of when/why you use $, #, %, etc. I'm just
    glad that I've got a few scripts created already, so that can just
    copy what I've done before. <g>

    Mike Hanson
    www.boxsoft.net

  9. #9

    Default Re: Files in Use

    After fiddling for a bit, I've found a combination that seems to work.
    Thanks!

    Mike Hanson
    www.boxsoft.net

  10. #10

    Default Re: Files in Use

    > After fiddling for a bit, I've found a combination that seems to work.
    > Thanks!

    Cool :-)

    Friedrich

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •