views:

921

answers:

4

Hi All,

Using a setup exe I created, I detect whether .NET CF 2.0 is installed. If not, using CreateProcess() I launch mobile IE and provide the URL to download the .NET CF 2.0 CAB as a commandline argument. As a result, the .NAT CAB is downloaded and automatically starts with the .NET CF install. At the end, the install prompts me to reboot the device.

Can someone tell me how I can suppress this prompt? I have read in some posts that you can use the /noui switch for wceload to suppress this. But in my case I do not directly launch wceload. How do I specify this switch to suppress the reboot dialog?

+1  A: 

Is modifying the device registry beforehand an option (e.g. if this is a corporate deployment of controlled devices)? If so you could modify the registry to make the default command line for wceload contain the /noui and /noaskdest flags. If this is for a general deployment to anyone, then no, you can't subvert the way that wceload works without some other form of user intervention (providing them an app that changes the registry, providing an ActiveX control that allows you to pass the args, etc).

A possible option would be to create some form of executable that they download instead that contains the CAB as an embedded resource. You could extract it and then call wceload with the proper switches in that case.

ctacke
A: 

Thanks ctacke. Thats the approach I had started out with: create a uber cab containing multiple cabs and this did not work as expected for me. Here is a thread on that: http://social.msdn.microsoft.com/Forums/en-US/windowsmobiledev/thread/c2067894-e7eb-46a7-82c7-227dee5f8d88

Modifying the device registry beforehand is not an option for me.

A: 

I finally got the .NET CF CAB to install manually using createProcess to run wceload.exe with the /noui parameter. But /noui suppress the progress bar as well. Is there a way to keep the progress bar but just get rid of the dialogs?

Thanks in advance!

No. The progressbar is considered UI, so it's all or nothing with wceload.
ctacke
A: 

If you have the option to use commercial applications, you can take a look at Mobile Packager . It does most of the things you are looking for. I hope it helps.