Alifiruk
Posts: 15
Joined: Tue Mar 04, 2008 9:50 am

Problem with Updater.

Hello. I have some problem with updater.exe.

After create simple C# application I create *.exe file for setup them with the possibility to update. After installation I change something in my application and create new *.exe file for setup. Next I create updates configuration file from last *.exe file and put them and *.exe to the server as your help advise. Now, the problem:

1. When I call updater.exe from my application with command line "/checknow" - application will be update after every calling, but finished with error.

2.When I call updater.exe with command line "/configure" and change CheckFrequency - time of next notification don't change and when I set system clock at notification time - updater do nothing, but notification time change to time of last configure dialog open. How I can see that updater really works and why it don't update?

3.At my application exists buttons which calls updater.exe with command line "/silent" and "/silentall". After install application on the clear system and run updater.exe "/silent" - it propose to install update. But after new updates appears this call do nothing. How I can see that updater really works and why it don't update?

4. Application don't restart after update. Command line is empty.

Our needs:
After setup application user can configure update time as he want. Updating occurs silent without any notification if server has new file with update.

Best Regards,
Anton Alifiruk.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
1. When I call updater.exe from my application with command line "/checknow" - application will be update after every calling, but finished with error.
If after the update is complete the Updater says "Some of the updates failed to install properly", then you are using an incorrect detection criteria. Note that you should use the main EXE of your application or a registry value which contains the version of the package as a detection criteria for the Update.
http://www.advancedinstaller.com/user-g ... rties.html

If you still get this message please contact me at support at advancedinstaller dot com and I will send you an example.
2.When I call updater.exe with command line "/configure" and change CheckFrequency - time of next notification don't change and when I set system clock at notification time - updater do nothing, but notification time change to time of last configure dialog open. How I can see that updater really works and why it don't update?
Please note that the CheckFrequency feature works like this:
- you integrate the Updater in your application and launch it when the application starts or you set the updater as a scheduled task
- when the Updater is launched (by your application or by the scheduled task) it must be launched with the /silent, /silentall or /silentcritical parameters
http://www.advancedinstaller.com/user-g ... dater.html
- now the check frequency is used
- if the check frequency has passed, when the updater is launched it checks for updates
- if the check frequency hasn't passed, when the updater is launched it does nothing
3.At my application exists buttons which calls updater.exe with command line "/silent" and "/silentall". After install application on the clear system and run updater.exe "/silent" - it propose to install update. But after new updates appears this call do nothing. How I can see that updater really works and why it don't update?
Since you are using the /silent parameter, the updater will silently check for updates. If an update is available the Updater will ask you if you want to update and it will launch the installation of the update.

If you choose to install the available update and nothing happens then there are two possibilities:
1) the installation of the update is silent
2) you are using an incorrect configuration for your projects

If the problem persists please send us a working test case which reproduces this behavior to support at advancedinstaller dot com so we can investigate it. This test case must include:
- the AIPs (Advanced Installer Project files) of both installation packages
- the AIP of the Updates Configuration Project
- both installation packages
- the updates configuration file
4. Application don't restart after update. Command line is empty
Please note that you should not perform an update while your application is running. Therefore you should make sure it closes after calling the Updater.

Also, if you need your application to restart then you must do this from inside the application (Windows Installer doesn't offer support for this).
After setup application user can configure update time as he want. Updating occurs silent without any notification if server has new file with update.
I'm afraid that this is not possible. Also, it is a little contradicting (if the user sets the update check frequency then the update should not be installed when it is posted on the server, it should be installed when the check frequency has passed).

I think that for your case, the best solution is to launch the Updater with the /silentall parameter. This way, whenever an update appears on the server the Updater will install it silently.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Alifiruk
Posts: 15
Joined: Tue Mar 04, 2008 9:50 am

Hi,

About error in the end of installation - it's ok. The problem solved.
cosmin wrote: Please note that the CheckFrequency feature works like this:
- you integrate the Updater in your application and launch it when the application starts or you set the updater as a scheduled task
- when the Updater is launched (by your application or by the scheduled task) it must be launched with the /silent, /silentall or /silentcritical parameters
http://www.advancedinstaller.com/user-g ... dater.html
- now the check frequency is used
- if the check frequency has passed, when the updater is launched it checks for updates
- if the check frequency hasn't passed, when the updater is launched it does nothing
Excuse me, may be I don't undestand something.
I integrate updater:
public Form1()
{
InitializeComponent();
try
{
Thread thread = new Thread(new ThreadStart(StartSilentAll));
thread.Start();

}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}

void StartSilentAll()
{
try
{
Process process = Process.Start("updater.exe", "/silentall");
process.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}

When update appears on server updater do nothing. Ok,it may be. Updater start after check frequency period and all be allright. But how I can verify that the feature works correctly at my application now?
I can't wait one day to veryfy this.
cosmin wrote:
Since you are using the /silent parameter, the updater will silently check for updates. If an update is available the Updater will ask you if you want to update and it will launch the installation of the update.

If you choose to install the available update and nothing happens then there are two possibilities:
1) the installation of the update is silent
2) you are using an incorrect configuration for your projects
It works once.
1. I create install exe for my app(1.0) with updater and button with next code
try
{
Process process = Process.Start("updater.exe", "/silentall");
process.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
2.Install my app(1.0).
3. Create new install exe with another version my app(2.0).
4. Create updates configure file from new exe.
5. Put new exe and updates configure file to the server(don't close app).
6.Click button - updater work correctly.Update was installed.And I have new version app(2.0) on my computer.
7. Create second install exe with new version my app(3.0)
8.Create second updates configure file
9. Put new install exe and config file to the server(don't close app).
10.Click button - nothing happens. Version of my app is 2.0.
cosmin wrote: Please note that you should not perform an update while your application is running. Therefore you should make sure it closes after calling the Updater.

Also, if you need your application to restart then you must do this from inside the application (Windows Installer doesn't offer support for this).
Updater starts. It close my app. After end of update it start my app(new version).
Does it possible?

Best Regards,
Anton Alifiruk
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
When update appears on server updater do nothing. Ok,it may be. Updater start after check frequency period and all be allright. But how I can verify that the feature works correctly at my application now?
Since the Updater checks for updates only after the updates check period has passed, you can make it check for updates immediately by modifying it's INI file. For this, open the INI of the installed "updater.exe" file and set the CheckFrequency to 0.

Regarding the second scenario, the Updater checks for updates only after the updates check period has passed. Therefore, you can launch the updater as many times as you want, it will check for updates only after the check frequency passes (and then it will find the update for the 3.0 version of your application).
Updater starts. It close my app. After end of update it start my app(new version).
Does it possible?
This can be done from inside the update package in two ways:
1) the user can decide if the file will be launched or not
For this you go to the "Dialogs" page, select "ExitDialog", select the "Finish" button, select the "Finish Actions" tab in the "Control" section and enable the "Launch application at the end of the installation" option.

You can read more about this here:
http://www.advancedinstaller.com/user-g ... sh-actions

2) the user cannot decide if the file will be launched or not
For this you can use a custom action scheduled under the "InstallExecuteSequence" -> "InstallFinalize" standard action (you can use the "Launch file or open URL custom action" for example). This custom action will have the "Expression" field in the "Execution Condition" section set to "NOT Installed".

You can read about custom actions here:
http://www.advancedinstaller.com/user-g ... -page.html

In order to use the custom action you can follow these steps:
- go to the "Custom Actions" page
- use the "Show Standard Action" button to show the "Before Finalization" -> "InstallFinalize" standard action
- under it create a "New Installed Custom Action" and select the application you want to run
- set the "Expression" field in the "Execution Condition" section to "(Not Installed)"

Now the custom action will run after the installation is complete (when "ExitDialog" is shown).

If you want to run the custom action when the user clicks the "Finish" button on "ExitDialog" then you create this custom action under "UI Custom Actions". After this, you go to the "Dialogs" page, select the "Finish" button, go to the "Published Events Tab" and add this control event:

Code: Select all

  DoAction   myapp.exe   AI_INSTALL
where "myapp.exe" is your custom action.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Alifiruk
Posts: 15
Joined: Tue Mar 04, 2008 9:50 am

cosmin wrote:Hi,

Since the Updater checks for updates only after the updates check period has passed, you can make it check for updates immediately by modifying it's INI file. For this, open the INI of the installed "updater.exe" file and set the CheckFrequency to 0.
Now, I change CheckFrequency value to 0. Create update. Start my app.
Automatic update don't start. Launch Updater with command line "/silent" - update don't start.

Best Regards,
Anton Alifiruk.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

Most likely this happens because the INI of the updater points to the updates configuration file of the first update. Please see the suggestions in the email I sent you.

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

Return to “Common Problems”