matyicsapo
Posts: 7
Joined: Mon Sep 03, 2012 12:56 pm

Custom actions on Mobile Device before installation

Hi,

I'd like to do searches possibly like in a standard MSI project, but on a Mobile Device.
I looked through the options of ActiveSync and Mobile CAB Package projects too.

A custom SetupDLL looked good, but I'd want to do this before the actual installation.
http://www.advancedinstaller.com/user-g ... updll.html

For example I want to detect a program whether it's installed on the device(registry search / file search for one of it's core files) and with what version and whether some other files are there too(so yeah, file searches).

I looked at XML Provisioning too, as the following guide says it can be used for querying too. However as it's an option in the CAB Package project I assume this would run when the installation launched from the desktop is actually starting.
http://www.advancedinstaller.com/user-g ... lprov.html

Other than that it seems I could write some C++ code most likely that would communicated with the physically connected device via the RAPI (http://msdn.microsoft.com/en-us/library/aa920177.aspx).
However, we have ActiveSync set as our chosen method for actually publishing the CABed installer, so I'm not quite sure how this would work.

Any help or guidance is welcome!
Thanks in advance :)

matyicsapo
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Custom actions on Mobile Device before installation

Hello,

In order to run a custom action before the CAB package installation you can create your own "Custom Setup DLL" having your custom action code added to the "Install_Init" predefined function.

Let us know if this helps, otherwise please give us more details about your scenario.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
matyicsapo
Posts: 7
Joined: Mon Sep 03, 2012 12:56 pm

Re: Custom actions on Mobile Device before installation

Thanks,

However, AFAIK (I couldn't test it yet and my colleague who is more acquainted with AI is not available ATM) the "Install_Init" predefined function runs after the user clicks "Install" in the "VerifyReadyDlg" dialog, that is, during the "Install Execution Stage".

I want to run my CAs on the Mobile Device BEFORE that, so that I can use the values queried in the "Wizard Dialog Stage".

Is a C++ Custom Action DLL our only option that connects with the device via RAPI?

tyvm
matyicsapo
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Custom actions on Mobile Device before installation

Hello,
I'd like to do searches possibly like in a standard MSI project, but on a Mobile Device.
My colleague Daniel is currently out of the office so I'll pick up this thread. Can you please specify why you want to perform a search during a mobile installation?
Unlike a normal .MSI you will not be able to use the result of that search to modify the contents of the .CAB. Whatever resources you set from the "Windows Mobile CAB" project will stay the same and they cannot be parametrized in any way.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
matyicsapo
Posts: 7
Joined: Mon Sep 03, 2012 12:56 pm

Re: Custom actions on Mobile Device before installation

The installer has to search for some values in the registry and search for an application executable file (taking it's version number into account) and the existence of some folders.
This is gives some information to decide HOW to continue with the installation, provide notes, warnings about various features.
I do realize a "Windows Mobile CAB" project doesn't have Features, each "feature" would be put into a different CAB package.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Custom actions on Mobile Device before installation

Hello,
This is gives some information to decide HOW to continue with the installation, provide notes, warnings about various features.
I do realize a "Windows Mobile CAB" project doesn't have Features, each "feature" would be put into a different CAB package.
This was my question. How are going to use the search result when you cannot pass any parameters to the .CAB?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Custom actions on Mobile Device before installation

Hello,

Since you're using ActiveSync you can try authoring a custom action in the .MSI which interrogates the device through RAPI and sets some public properties in the .MSI. You can then use these properties to condition the .CABs application groups in the ActiveSync page.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
matyicsapo
Posts: 7
Joined: Mon Sep 03, 2012 12:56 pm

Re: Custom actions on Mobile Device before installation

Great, Thanks for all the help!

Hopefully there won't be any unexpected problems :)

matyicsapo

Return to “Building Installers”