question regarding IModInstaller | developer.brewmp.com question regarding IModInstaller | developer.brewmp.com

Developer

question regarding IModInstaller

Can we update an application from the same application using IModInstaller?

In the sense, I want to update, for eg, c_basicapp from c_basicapp itself. If there is an update in server, I'll download the tar file and call IModInstaller_StartInstall() form c_basicapp itself, without using a seperate app for updating.

Can we do it this way?

u may be able to do it as the mod may be already loaded into the memory once you start the Application.
But it can lead into un-precedented errors, if after exicuting the Install/Update command, the primary App try to access filesystem, its resources etc. bcoz the App would be disabled before Upgrade.

u may be able to do it as the mod may be already loaded into the memory once you start the Application.
But it can lead into un-precedented errors, if after exicuting the Install/Update command, the primary App try to access filesystem, its resources etc. bcoz the App would be disabled before Upgrade.

Try looking at the IModInstaller2 interface. It allows installing a new app as 'inactive' that can then be scheduled to deactivate the current app & activate the new app 'on the fly' or on the next reboot.  If you install a new app (with the same AEECLSID) on top of itself you risk generating temp folders from the previous app that will need to be manually cleaned up later.

Try looking at the IModInstaller2 interface. It allows installing a new app as 'inactive' that can then be scheduled to deactivate the current app & activate the new app 'on the fly' or on the next reboot.  If you install a new app (with the same AEECLSID) on top of itself you risk generating temp folders from the previous app that will need to be manually cleaned up later.

If you are using any reasource files (like .bar files) you may have issues updating if those files are locked.  You can test your code out on the simulator and use a tool like Sysinternal process explorer to make sure your .dll has no open files when you do the update.  It may make more sense for you to create a seperate applet to do this.

If you are using any reasource files (like .bar files) you may have issues updating if those files are locked.  You can test your code out on the simulator and use a tool like Sysinternal process explorer to make sure your .dll has no open files when you do the update.  It may make more sense for you to create a seperate applet to do this.