Integrating updater with the application. - Advanced Installer Community

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!

hchandr
Posts: 3
Joined: Thu Dec 13, 2007 9:36 pm

Integrating updater with the application.

I have two questions.

1. I read the user guide about integrating the updater with the java application. Is there any return value from the updater process which indicates whether an update is available or not? (i saw a similar question in the forum. but the solution to that was to use the updater as scheduled task)

2. If i schedule the updater as scheduled task, the updater does not work on machines where users don't have admin previlleges. Is there any solution for that?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
Is there any return value from the updater process which indicates whether an update is available or not?
Because of the way the updater works, you cannot use in any way it's return code. Can you please give more details about why you need this?

Please note that this situation is handled automatically by the updater (if an update is available it will prompt the user or install it silently, depending on the settings, otherwise, it will not prompt the user).
If i schedule the updater as scheduled task, the updater does not work on machines where users don't have admin previlleges. Is there any solution for that?
Please note that a user that has limited rights can use the updater only if these requirements are met:
- the "Installation Type" field in the "Install Parameters" page of your installation package is set to Per-user only
- the limited user installs your application in locations for which he always has write access
- the Updater is set as a scheduled task for the limited user (not for another user, even an administrator)
- the update process doesn't need to write information in a location for which the limited user does not have write privileges

Note that if your application is installed Per-machine and in a location for which the limited user doesn't have write privileges (for example "C:\Program Files"), the limited user cannot perform an update.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hchandr
Posts: 3
Joined: Thu Dec 13, 2007 9:36 pm

1. I tried using the setting - "Per-machine if the user is administrator, per user otherwise". I hope that meets the requirement for the scheduler to run correctly. But still we are having issues with running scheduler on some of the machines where user doesnt have enough previlleges.

2. About the return value - My requirement is to start the updater when the application starts up. And based on the result of the updater(if there is an update or not), i need to either continue with starting the application or close the app and ask user to download the new version(which is already handled by the updater). So the tricky part for me is to decide whether to continue loading the application or not. This is because serveral times, user will not be able to work with the older verion after a new version is introduced. Can you suggest me a way to do this?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
But still we are having issues with running scheduler on some of the machines where user doesnt have enough previlleges.
Like I said in my previous post, a limited user can run the Updater as a scheduled task only if the requirements I mentioned are met.
So the tricky part for me is to decide whether to continue loading the application or not. This is because serveral times, user will not be able to work with the older verion after a new version is introduced. Can you suggest me a way to do this?
I'm afraid that you cannot use the Updater return code because it is always 0 (zero) if an error is not encountered. However, I have added this feature on our TODO list and it will be available in a future version of Advanced Installer.

Until then, you can try to use our How-To about making an application wait for the Updater to finish to let your application know if the updater found updates (it creates a new process and starts to download them) or it found nothing (the new process is not created):
http://www.advancedinstaller.com/user-g ... dater.html

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hchandr
Posts: 3
Joined: Thu Dec 13, 2007 9:36 pm

Is there any way to do this (wait for updater) from java? When I tried executing the updater process and if there was an update, the process simply returns 0 and exits. I was not able to recognize if the updater was still executing. Does the updater create a separate process for doing so?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
Is there any way to do this (wait for updater) from java?
I'm not sure about this because I'm not a Java programmer. You can try to implement your own Java code based on our example.
When I tried executing the updater process and if there was an update, the process simply returns 0 and exits. I was not able to recognize if the updater was still executing.
Like I mentioned in my previous post, the updater always returns 0 (it doesn't matter if an update was found or not) if no errors have been encountered.
Does the updater create a separate process for doing so?
Note that if an update is available and the correct conditions have been met (for example the updater is scheduled to search for updates) then the Updater will create a new process to download and install the update. If no updates are found then the Updater does not create a new process and it will stop.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”