views:

1525

answers:

3

I have my first Windows Mobile app ready for deployment (Windows Mobile 6). I have made my CABProject and made a .cab file that will install successfully. How can the .cab be made to delete itself after installation? Some things I read seem to indicate that this should be the default behavior.

Thanks

+2  A: 

Cab files are installed using wceload utility. Deleting the cab is indeed the default behaviour.

For more advanced features see CABInstallerSDK.

kgiannakakis
+1  A: 

CAB files are installed using the wceload utility as kgiannakakis says, but the default behavior for what happens when you run the CAB either through explorer or through actiesync install varies from device to device. Typically I've seen SmartPhone devices default to deleting the cab file. On Pocket PC's I mostly seen the CAB not being deleted.

So what I've saying is that you can't guarantee that the CAB file is deleted after install unless you arrange for your code to be calling the "wceload" utility and therefore have control over it's parameters.

Shane Powell
Thanks. I'll look into the wceload a bit more. The lack of self-deleting on the mobile device in question (an HP iPAQ) is not a huge deal but it would be nice to have the program clean up after itself.
monkeypushbutton
A: 

kgiannakakis is correct that the default behavior of the wceload utility is to delete the cab file after installing, but the /nodelete flag changes this behavior.

you'll find: [HKEY_CLASSES_ROOT\cabfile\Shell\Open\Command] @="wceload.exe "%1" /nodelete"

on some devices which will cause the default behavior on that device to differ.

Greg