PDA

View Full Version : Close Open Files



NewsArchive
06-18-2015, 03:19 AM
Hi Friedrich,

I have a situation with one of our products (in this case there is one
install on the "server" and workstations run the application from a short
cut). Occasionally one of the workstations' instance of the application is
left running as a process (although the UI has closed down) on the
workstation PC. Is it possible to "Close Open Files" (see attached screen
shot of a server) in the install like one can do manually from the "Computer
Management" console? I cannot seem to find a command that can do this
(Terminate Application seems to only terminate an instance running on the
install PC).

Geoff

NewsArchive
06-18-2015, 05:55 AM
Hi Geoff,

Is the SetupBuilder installer running on the "server" where the file is
"locked"?

I am working on a nice new built-in SB feature that lets you close open
files from both the server and remotely (via the upcoming SBRemote
functionality) from a workstation.

Friedrich

NewsArchive
06-19-2015, 01:13 AM
Hi Friedrich,

That sounds exactly what I need. The files (in this case) are locked on the
server (although another PC has the files open). I won't need the remote
close in this case, but may have the need for it in another of our installs.
My immediate need is the ability to close open files on the PC itself (where
the install is running).

Let me know if you need a guinea pig...

Geoff

NewsArchive
06-19-2015, 01:14 AM
Geoff,

> That sounds exactly what I need. The files (in this case) are locked
> on the server (although another PC has the files open). I won't need
> the remote close in this case, but may have the need for it in another
> of our installs. My immediate need is the ability to close open files
> on the PC itself (where the install is running).
>
> Let me know if you need a guinea pig...

Perfect! I'll compile a SB test version for you this coming weekend.

Friedrich

NewsArchive
06-22-2015, 02:36 AM
HI Friedrich,

Thanks so much. Very happy to be the test case

Geoff

NewsArchive
06-22-2015, 05:50 AM
Hi Geoff,

>
> Thanks so much. Very happy to be the test case
>

The new "Force File Close" function ('use at your own risk' <g>) in
SetupBuilder seems to work fine. We have tested it on several different
Windows operation systems, including the latest Windows 10.

For example, the following scenario. Windows 7 (x64) machine starts a
C10.EXE executable through a shared folder. The C10.EXE is located on a
Windows 10 (x64) machine. Any attempt to delete C10.EXE on Windows 10
results in a "File In Use - This action can't be completed because the file
is open in System. Close the file and try again." error. Then we fire
"Force File Close" from SB and after that, the file can be removed.

I'll send you an internal download link later today.

Friedrich

NewsArchive
06-22-2015, 05:50 AM
This is indeed a very cool feature!

We get quite a few support calls after each update where people say "It
says a file is open but everyone has logged out of the program". And
guiding a user to the server to find and close open files is - to say
the leat - a challenge <g>.

Peter

NewsArchive
06-23-2015, 02:23 AM
"Force File Close" in action (see attached screenshots).

Win7 "client" locks the C10.EXE file located on a Win10 "server". The SB
compiled "ForeFileClose.exe" application detects the in-use file status,
forces the file to "close", re-checks the file status und then removes the
previously locked file.

Friedrich

NewsArchive
06-23-2015, 02:25 AM
Hi Geoff,

Download link for #4822 sent. Does the new "Force File Close..."
functionality work for you?

Friedrich

NewsArchive
06-23-2015, 02:26 AM
Hi Geoff,

I woke up tonight and realized something was wrong. The new function does
not resolve runtime variables. I'll fix this and upload a new version.

Friedrich

NewsArchive
06-23-2015, 07:04 AM
Hi Geoff,

Internal build #4823 uploaded.

Friedrich

NewsArchive
06-24-2015, 02:25 AM
Hi Friedrich

>"Force File Close" in action (see attached screenshots).

Great news, I definitely will use this.

Does the new function take wildcard parameters? I guess most of the time
we'll need to force file close the.exe and *.dll, and maybe *.tps to let FM3
do its thing in the first run.

Carlos Gutierrez

NewsArchive
06-24-2015, 02:25 AM
Peter,

> This is indeed a very cool feature!
>
> We get quite a few support calls after each update where people say "It
> says a file is open but everyone has logged out of the program". And
> guiding a user to the server to find and close open files is - to say the
> leat - a challenge <g>.

We have test results from a 75 client machines environment. In most cases,
one or more users did not log out and left the session open. As a result,
application files on the server were still "in-use" and the Admin had to
restart the server to replace the locked files during a reboot procedure.

This time the installer made use of the new functionality. Two machines had
a session open. The update detected the locked files, called the "Force
File Close..." action and no reboot necessary :-)

Friedrich

NewsArchive
06-24-2015, 02:26 AM
Super!

Peter Hermansen

NewsArchive
06-25-2015, 04:32 AM
Hi Carlos,

>>"Force File Close" in action (see attached screenshots).
>
> Great news, I definitely will use this.
>
> Does the new function take wildcard parameters? I guess most of the time
> we'll need to force file close the.exe and *.dll, and maybe *.tps to let
> FM3 do its thing in the first run.

The "Force File Close..." function can only force to close a single network
shared file. But you can handle this very easily in SetupBuilder. See
attached screenshot. You build a list of files (e.g. *.exe;*.dll wildcard).
Then Loop through the list of files and check the in-use status. If a
shared file is "in-use", force to close it (and handle the return value if
you want).

Friedrich

NewsArchive
06-25-2015, 05:33 AM
Hi Friedrich,

Thanks very much for that. I have mailed you some feedback.

Let me know if you did not receive it.

Geoff