Update setup settings not saving

Got a problem you cannot solve? Try here.
lanamor
Posts: 8
Joined: Tue Oct 04, 2011 12:18 pm

Update setup settings not saving

Postby lanamor » Mon Nov 23, 2015 10:55 am

I'm having an issue where the update settings are not being preserved. Towards the end of my setup package I call

Code: Select all

$WINDOWSINSTALLERDIR$\$TITLE$ Updates for All Users.lnk /updatesetup
. From the setup's programdata folder I found that the file [title].dat stores the variables (UPDATE_INSTALL, UPDATE_AUTO, and UPDATE_DOWNLOAD), and it has the proper variable set to true (i.e. UPDATE_AUTO = TRUE). The problem is that once the setup completes, this dat file is updated so that UPDATE_DOWNLOAD = true, no matter what was originally selected. Once the setup is complete I can run [setup].exe /updatesetup and the settings are preserved from here on out. I want the user to be able to setup the update settings from the original setup program, what am I doing wrong?

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Update setup settings not saving

Postby FrancescoT » Mon Nov 23, 2015 2:39 pm

Dear lanamor,

please excuse me, but it's not clear to me which is the parameter condition that you want to preserve.

If I am not wrong, you are referring to the "installedupdates.dat" and this keeps tracks of the installed updates.

Of course such "dat" file gets updated, and all the logic behind this, it's full available with the "updates" script.
This script is full responsible of the entire update process, including the "dat" file update process.

Caould you please try to share some more details?

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

lanamor
Posts: 8
Joined: Tue Oct 04, 2011 12:18 pm

Re: Update setup settings not saving

Postby lanamor » Mon Nov 23, 2015 3:43 pm

I'm referring to the parameters set from the "update_setup_schedule" dialog. As in: Notify me before downloading.. , Download the updates automatically and notify.. , and Automatically download the updates and then install.

If I call [setup].exe /updatesetup you get the dialog i reference above. If I call [setup].exe /updatesetup from within my setup the settings are not being saved. These parameters appear to be saved in [title].dat, not installaedupdates.dat.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Update setup settings not saving

Postby FrancescoT » Tue Nov 24, 2015 12:10 pm

Dear Lanamor,

I really believe that exists a big misunderstanding About how the scheduled update settings are handled.

If you have a look at the "updates" script (where all the update logic is handled), you will see that such parameters are not stored. Instead those are used to at setup runtime, to define a scheduled a task on the target machine (the Windows Task Scheduler via "Schedule Task" commands in the "updates" script).

That said and each time a new update is installed, by default the process doesn't check if any previous task has been already defined. Contrariwise, it tries to creates a new task process Always or to overwrite a previously defined task (if any), Of course this in case the user confirms the update notification settings from the "update_setup_schedule" dialog. Alternatively if the user doesn't confirm the update notification settings, the process arbitrarily deletes any existing "update scheduled task" ( ...the one that may have been defined at first time).

In case you want to keep such settings, you need to store those parameters with a custom file.
Of course you also have to modify the "updates" script logic, in order to handle such settings properly.

I suggest you also to have a look at the "WebUpdate sample (customized)" (http://www.installaware.com/forum/viewtopic.php?f=2&t=6772&start=0).

"The sample demonstrates how to run the "update scheduler" mode at the end of the installation process.
The default "Scheduled Web Updates" mode is also supported, in case the "update scheduler" settings are not confirmed with the above implementation."

You may use it as starting point of your custom implementation.

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 99 guests