How to pass parameter at the time of WinCE app installation/deployment

115 views Asked by At

I have my WinCE application bundled in a CAB file. At the time of CAB extraction I want to add some value in a config file of the app. The value has to be provided by the person who is installing the app (extracting the app).

I thought to extract the cab file by running a script that uses WceLoad.exe. But this tool does not pass any parameter to the CAB file. Moreover I am not sure how would the CAB accept parameter when it is extracting(installing). I thought to use Setup project that can be used to customize the installation but none of its methods i.e. Install_Init and Install_Exit accept any parameter.

Is this scenario possible to handle through CAB file deployment? Or is there other way to deploy so that values could be passed at the time of deployment?

1

There are 1 answers

0
josef On

ce_setup.h shows that the only argument passed is the pszInstallDir argument. The rest are only installation results (ie failed files).

You may need to write a custom installer. For example using MortScript with a zip file etc.

The issue with a setup.dll is also, that it does not allow access to files of the cab during installation.

A workaround I see, is to copy another file to the device before that cab is installed and read and process that file in setup.dll. For example: provide a static IP in a txt file, read that file during Install_Init and set a registry key with the IP, for example.