Pregunta

I wanted to know how to programmatically install a CAB file from my .NET CF application. I figured it would be as simple as starting a process with the name of a windows ce program and the CAB file path as a parameter. But I don't know what that program is or where it's located. Any ideas anyone? Thanks in advance.

¿Fue útil?

Solución

The process is named WCELOAD.EXE. Here is the MSDN page for more information: http://msdn.microsoft.com/en-us/library/ms933760.aspx.

It gets more complicated if you have a requirement to support "Pocket PC" (the OS version 4.x before it was called Windows Mobile). Pocket PC does not support compressed CAB files and some of the WCELOAD.EXE command line parameters are not implemented.

I've found setting the CAB file to read-only is the best approach. If the user taps on the CAB file via File Explorer then the system will delete the CAB file after installation is complete. When you're calling WCELOAD programmatically, you can use /delete 0 to prevent this from happening.

Otros consejos

I guess I asked this question to quickly, the answer was very easy to find. Because CAB files are recognized by the OS, I can simply do this:

Process process = new Process();
process.StartInfo.FileName = @"\Documents\MyApp.CAB";
process.Start();

I also found this here but I haven't tried it. Hope it helps someone else.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top