What am I doing wrong with autoupdates? - 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!

vulgrin
Posts: 40
Joined: Fri Jan 11, 2008 9:49 pm

What am I doing wrong with autoupdates?

I'm testing out AI and trying to understand autoupdates. Here's what I've done:

Created a .NET app that simply shows the current version number.
Created a splash screen app that shows a splash screen and which will call the autoupdater. (this might be integrated with the main app later, but we use a separate splash screen in the product now that is the launcher.) The splash screen uses the sample code to run a process and call the installer with the /checknow option.

I then created three AIPs:

The main AIP that creates the MSI and points to my update location on the web.
One to create a MSP
One to create the updates text file.

I start with both apps being version 1.0.0.0 and my AIP being 1.0.0.0 and create the first MSI and drop it into a 1.0 folder
I then update everything to 1.1 keeping the same product id and create my second MSI and drop it into a 1.1 folder
I create my MSP off of the diff between the two.
I create my .TXT file

I drop the MSP and my .TXT on my updates location, then install 1.0 of the software. I run the main EXE to make sure it really is 1.0, then I run the splash.exe. Every time it quickly reports back that the software is up to date.

The INI looks ok, and the updates.txt looks ok. I have no clue why it isn't updating. Is there a way to generate debug information from the autoupdater?

If you want to see my projects, I can zip up and email you the whole thing. Just tell me where to send it.

Thanks for your help.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: What am I doing wrong with autoupdates?

Hi,

Did you correctly configure the Installed Detection section for the Update? Note that this section will be used by the Updater to determine if the application is up to date or not. Usually the detection criteria is the main EXE of the application or a registry entry which contains the version of the package.

Please note that we have a tutorial for using the Updater.
Is there a way to generate debug information from the autoupdater?
I'm afraid that this is not supported by Advanced Installer.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vulgrin
Posts: 40
Joined: Fri Jan 11, 2008 9:49 pm

Re: What am I doing wrong with autoupdates?

Yes, the criteria points the main app EXE and tells it to look for version 1.0.0.0 You can see my update.txt file here:

http://www.steelsphere.com/updates/updates.txt

I looked at the tutorial and as far as I know that's pretty much what I'm doing. I'm not seeing any discrepancies I don't think. I didn't create a shortcut to check the updates, but everything else should be pretty much the same.
dms
Posts: 164
Joined: Tue Aug 28, 2007 7:11 am
Location: UK

Re: What am I doing wrong with autoupdates?

I didn't create a shortcut to check the updates
I suspect this may be part of the reason you appear not to be having any success. The default settings when you add the updater.exe to you project and allow it to do it's own thing quietly in the background is for it to check for updates every two days. Clearly if you've just created your test app you're running a little early.

This caught me out as well so I put a test button into my app to check for updates on demand as well. From my point of view when it comes to testing this has been a great help.

Dom
vulgrin
Posts: 40
Joined: Fri Jan 11, 2008 9:49 pm

Re: What am I doing wrong with autoupdates?

No, I am doing that. I call the updater exe with the /checknow switch from the Splash app. So technically, I'm doing the same thing as the shortcut would do.

I also tried launching it from the command line directly with /checknow. Same result.
dms
Posts: 164
Joined: Tue Aug 28, 2007 7:11 am
Location: UK

Re: What am I doing wrong with autoupdates?

The only other thing I can suggest that you do is to double check the location that you specified for both your updates.ini or .txt file and the download msp itself.

I got the same error that you are getting and eventually realised that I had directed the updater to look in the wrong place for both elements. All too easily done, andd equally all too easy to miss.

Dom
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: What am I doing wrong with autoupdates?

Hi,

In the Updates Configuration File you are using the Version field is set to 1.0.0.0. Since this is the expected value, the Updater will not install the 1.1.0.0 version.
Please make sure that the Expected Version is set to to the version of the Update (1.1.0.0) and let me know if the problem persists.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vulgrin
Posts: 40
Joined: Fri Jan 11, 2008 9:49 pm

Re: What am I doing wrong with autoupdates?

Ah ha. Now I understand - I thought it was the target of the version that I was trying to upgrade FROM, not to.

Ok, I have it auto updating and running my MSP now. One note: you really need to make it more clear in the MSP creation to set that "Product Version Relationship" to something besides Installed Version = base version. This took me FOREVER to figure out that it needed to be set to Installed Version <= base version to get the patch to run.

One final problem (not counting the SQL stuff I still need to test) is that when I upgrade my 1.0 to 1.1 via the patch, and then I go to control panel to add / remove the product, installed files stay behind in my installation folder. How do I fix that so that an uninstall is clean?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: What am I doing wrong with autoupdates?

Hi,
One note: you really need to make it more clear in the MSP creation to set that "Product Version Relationship" to something besides Installed Version = base version.
Please note that the default "Installed version = base version" option is the recommended one and if your patch doesn't work with it then there is something wrong with your installation packages (and or patch).
when I upgrade my 1.0 to 1.1 via the patch, and then I go to control panel to add / remove the product, installed files stay behind in my installation folder.
If the patch is built and applied correctly, all the files installed by the original package and by the patch should be removed. Can you reproduce this behavior on a clean machine? Also, if you remove all these files and try again, do the files still remain? If this is the case then you did not configure the patch and packages correctly.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vulgrin
Posts: 40
Joined: Fri Jan 11, 2008 9:49 pm

Re: What am I doing wrong with autoupdates?

Yeah, I tried that default option and it wouldn't install the patch. That's why I had to use the <= setting. I haven't a clue what I'm doing wrong then. Is there something specific I need to be looking for?

As far as removing goes - yes, the machine I was testing on was clean.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: What am I doing wrong with autoupdates?

Hi,

In order to create a patch you can follow these steps:
- you do a back-up of the AIP (Advanced Installer Project file) of the first installation
- you open the AIP of the first installation in Advanced Installer
- in the "Product Details" page you increase the version (in the "Product Version" field)
- after you select another page you are prompted about changing the Product Code
- in this dialog you select "No" because the target and upgraded packages must have the same product code
- you update the package (add/remove/modify files, registry keys etc.)
- you save and build the project (the target and upgraded packages must have the same name, for example: "test.msi")
- in Advanced Installer you create a Patch project
- you set the target (old MSI) and the upgraded (updated MSI) packages (you can use the wizard or you can set them in the "Images" page)
- you build the project

If you use the default options for the patch project then the patch should be applied correctly.

I'm not sure why your patch doesn't work. Did you follow the above steps? If this is the case please send us a small test case which shows this behavior to support at advancedinstaller dot com so we can investigate it. The test case should contain:
- the AIP files of the target an upgraded images
- the target and upgraded installation packages
- the AIP of the patch project
- the MSP file

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vulgrin
Posts: 40
Joined: Fri Jan 11, 2008 9:49 pm

Re: What am I doing wrong with autoupdates?

Almost exactly what I did - the only variation that I can see is that I didn't back up the original AIP. As I was trying to get this to work and was building MSIs, I was switching the product code back and forth from 1.0 to 1.1 and back - always opting to not update the product code.

Now that I think I know what I'm doing, I'll give it a try with a completely new, completely clean AIP and follow your steps exactly. Who knows what I hosed while I was messing around trying to get the autoupdater running. If that doesn't work, then I'll zip up and send you guys the files.

Thanks for all your help - your fast support in the forums has pretty much ensured our use of the product, providing the SQL stuff we need works ok. I just have to figure out why I'm doing things wrong. :)
vulgrin
Posts: 40
Joined: Fri Jan 11, 2008 9:49 pm

Re: What am I doing wrong with autoupdates?

Well no luck. I just did a completely clean installer, following your directions and using the defauls. This time, the patch will install, but its not actually updating my EXEs.

I am zipping up EVERYTHING, including the VS.NET test project and the MSIs/ MSP that I generated and will email it to you.

Thanks

Return to “Common Problems”