PDA

View Full Version : Sensing an installation is underway?



NewsArchive
10-25-2017, 09:46 AM
I creating a SB script. I would like to ensure that two people are not
installing simultaneously, or that an earlier installation didn't fail
midway and not properly recover.

I was going to just create a marker file when the install first began,
then delete it at the end, but before I do that I thought I would
check if there's some way to determine that a SB installation is
underway in a given folder?

Mike Hanson
www.boxsoft.net

NewsArchive
10-25-2017, 01:41 PM
Hi Mike,

> I creating a SB script. I would like to ensure that two people are not
> installing simultaneously, or that an earlier installation didn't fail
> midway and not properly recover.
>
> I was going to just create a marker file when the install first began,
> then delete it at the end, but before I do that I thought I would
> check if there's some way to determine that a SB installation is
> underway in a given folder?

What about this method?

http://www.lindersoft.com/forums/showthread.php?43407-Allow-one-setup-running-at-one-time&p=77500#post77500

Friedrich

NewsArchive
10-25-2017, 01:41 PM
Thanks for the suggestion, but I don't think that will work, for two
reasons:

They could be running it on a client machine, pointed at a shared
destination on a folder. The MUTEX would catch that.

If an earlier installation died part way through, I want to know that
it was underway and unfinished, so that the support staff can ensure
that it's OK.

That's why I was leaning toward using creating a file called
"Installing!" in the destination folder. If the file existed, then
they could not proceed with a subsequent installation. That file
would be deleted near the end of the install script (after everything
has safely completed).

Mike Hanson
www.boxsoft.net

NewsArchive
10-25-2017, 01:42 PM
> Thanks for the suggestion, but I don't think that will work, for two
> reasons:
>
> They could be running it on a client machine, pointed at a shared
> destination on a folder. The MUTEX would catch that.
>
> If an earlier installation died part way through, I want to know that
> it was underway and unfinished, so that the support staff can ensure
> that it's OK.
>
> That's why I was leaning toward using creating a file called
> "Installing!" in the destination folder. If the file existed, then
> they could not proceed with a subsequent installation. That file
> would be deleted near the end of the install script (after everything
> has safely completed).

Okay, understood. Then just create a, say, text file when you start the
installation process ("Handle Text File Operation -> Create File"). Then
you can use "If File/Folder..." to see if the file exists and to determine
an installation is underway. At the end of the installation, use "Delete
File(s)..." to remove your file.

Do you think this could work?

Friedrich

NewsArchive
10-25-2017, 01:42 PM
Yup, I think that's the approach I'm going to take. I've framed it in
now, and it seems to work. I create the flag file right before it
begins installing files, and deletes it near the bottom.

Within the script, after they choose the destination, I ensure that
the flag file isn't there. Then I also check it once more after they
hit hit "Go" on the "Ready" dialog.

So far it seems to do the trick. Thanks, Friedrich.

Mike Hanson
www.boxsoft.net

NewsArchive
10-26-2017, 02:44 AM
> Yup, I think that's the approach I'm going to take. I've framed it in
> now, and it seems to work. I create the flag file right before it
> begins installing files, and deletes it near the bottom.
>
> Within the script, after they choose the destination, I ensure that
> the flag file isn't there. Then I also check it once more after they
> hit hit "Go" on the "Ready" dialog.
>
> So far it seems to do the trick. Thanks, Friedrich.

Perfect! You are welcome :-)

Friedrich