PDA

View Full Version : Support “hosted” installs, ie. track multiple installation folders?



RichBPL
06-16-2021, 02:51 PM
My SB script is used for installing/updating multiple instances to a hosting server. Each instance is slightly different than the others. I would like to track information about each installed instance and when the program is run in “update” mode let the user select which of the previously installed instances they would like to update, perhaps using the "checkbox" dialog. Is there a way to have the checkbox choices come from a text file? The number of choices will increase by one, each time a new instance of the app is installed.

lmodern1878
06-28-2021, 02:25 AM
Hi there:

At least to my understanding, the number of checkboxes on a single instance of the checkbox has a hard limit of 10 items. So even if I could think up a way to read in the text from file that file would be limited to 10 items. To accomplish what you’re thinking i just thought up a quick solution:

1. When the new instance is installed, have a dialog that asks for a unique installation ID
2. Store the user input in a variable such as %installname%
3. Write the variable’s contents out to a text file somewhere in the instance where you’re sure the user won’t change it
4. At update time, ask the user for the path of the installed instance then look for that text file and read that install ID into a new variable such %targetinstall%. Set an if statement that if %targetinstall% equals (a value) then make (specified changes) else do something different.

You can add a dialog that prompts the user for install ID to see if the ID from the file and the instance the user thinks they’re updating match.

This is just a quick solution i came up while I was bored, so I’m sure there’s a better way and I’m not sire of any consequences or adverse effects from doing it this way, but definitely give it a go.

RichBPL
06-29-2021, 03:18 PM
Imodern1878:
Instead of letting the operator check-mark which installed instances of my app should be updated, I decided to give them three choices when it comes to applying an update:
1) Update a single instance of the app
2) Update all instances owned by one customer
3) Update all instances across all customers.

I ended up using a Listbox of customers and a Listbox of application instances owned by that customer.
Data for the listboxes are stored in separate text files. I use the SB "Handle Text File Operation", "Create Text File" and "Set Access Control" to manage the content of the files.

lmodern1878
07-01-2021, 02:55 AM
Rich:

I didn’t see that coming! Wow! Thanks for the undate.

RichBPL
07-01-2021, 04:20 PM
Yeah, I think just giving the operator the three choices of updating: 1) all installed instances, 2) instances for one customer, 3) one instance; along with an option where they can choose to confirm before SB applies each update, is all that site operators will need when it comes to installing updates. I do have other menu choices on the installer now. Like: a) install new instance, b) remove instance, c) rebuild customer list, etc.

lmodern1878
07-03-2021, 09:23 PM
Rich:

I’d love to see a demo of how you built this up. Can you create demo that doesn’t use your actual product but maybe some demo HTML Files or something and share it to like Google Drive or MEGA?

RichBPL
07-07-2021, 01:45 PM
Thanks for asking, but it would take too much time for me to do a proper video that explains the script. Especially, since we don't know what is coming out in the next release of SB. It could be the next release of SB will provide a simpler way of using SB to manage installing and updating multiple instances of desktop software or, in my case, an API service to a hosting server.