We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

scott9999
Posts: 2
Joined: Wed Jul 13, 2022 2:40 pm

Manual and automatic updaters on non-controlled user machines

I have a package that's going out to customer PCs that I don't have any control over, and I'm attempting to configure an auto updater to cover hopefully 50% of them with a backup updater that they can click on to do it manually.

1) Where is the time and date stored for the frequency check of the updater? Being able to manually tweak that would be very helpful with my testing. I'm not seeing anything obvious in the registry or in appdata or the local directory.
2) For the automatic updater, I'd like to have it not pop up the dialog saying that there was no updates, but bring up the installer if there is an update. I presume the CheckFrequency should be set to say 1 or 2 and the default command line would be /silent within the updater.ini file.
3) For the manual updater, it should be a shortcut to the exe with the parameter /checknow.

For the updater service, it seems like my best option would be to create a local administrator user with a random strong password created by a powershell script in the prerequisites and then run the update service with that user. Then I'd need to store it encrypted somewhere (say the registry) so when there are updates it will detect the user being there and remember the password in the updater. Am I on the right track with this? Is there a better way to do this that would survive an uninstall process?
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Manual and automatic updaters on non-controlled user machines

Hello Scott and welcome to our forums,
1) Where is the time and date stored for the frequency check of the updater? Being able to manually tweak that would be very helpful with my testing. I'm not seeing anything obvious in the registry or in appdata or the local directory.
If I'm not mistaken, the frequency check is done from within the updater itself so it is not stored anywhere.
2) For the automatic updater, I'd like to have it not pop up the dialog saying that there was no updates, but bring up the installer if there is an update. I presume the CheckFrequency should be set to say 1 or 2 and the default command line would be /silent within the updater.ini file.
If you do not want the Updater's UI to spawn, then indeed you could use the "/silent" parameter, as explained in the following article:

Advanced Installer Updater

For this, a solution would be to create a scheduled task that automatically checks for updates and pass the "/silent" parameter to the Updater. More details about this in the following article:

How to Use Advanced Updater to Configure Auto-Updates for Your Application
3) For the manual updater, it should be a shortcut to the exe with the parameter /checknow.
You are correct here, this would be the right approach.
For the updater service, it seems like my best option would be to create a local administrator user with a random strong password created by a powershell script in the prerequisites and then run the update service with that user. Then I'd need to store it encrypted somewhere (say the registry) so when there are updates it will detect the user being there and remember the password in the updater. Am I on the right track with this? Is there a better way to do this that would survive an uninstall process?
Regarding this, please note Advanced Installer already offers the support to create a user account upon installation:

Users and Groups page

Of course, here you can create a bootstrapper package that only creates the user as you mentioned and add that as a prerequisite. This is completely fine as well.

If you want to encrypt the password, you can use the "Secure property" option ("Properties" page).

However, here is a little tweak we need to do. Basically, if you want to both create a user and then encrypt the password used, we must pay attention to the fact that the properties are actually encrypted before the user is created, so we might end up with the password for the respective user being the encrypted one.

To avoid this, please have a look over the following thread:

Secure Property User Password isn't specified value

Additionally, upon upgrade, we should somehow be able to decrypt that password.

This can be done by calling the specific functions from the "SecureProperty.dll", as explained in the following article:

Re: Applying patch is changing service start type

Here, of course, you can create your own way for encrypting the password (e.g. through another PowerShell script).

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”