Add setup. DLL to the Windows Mobile cab installation package for custom operations
The example of setupdll can be found below samples of the installed SDK.
In this example, a setup. dll is generated.
We can set setup. DLL is added to the cab Installation File of your project to complete various complex operations during installation, such as installation, uninstallation prompts, various information message prompts, registry modification, and other operations.
In the example provided by MS, you can perform the register and unregister operations on cfgclient.exe when installing/unloading.
We can remove this part and write the desired stuff in the interface below.
When install_init is installed
When install_exit is installed
Uninstall_init
Uninstall_exit
Example:
If we want to prompt "Installation Complete, restart to be effective" when the installation is complete ".
As longCodeChange it to the following format.
# Include "aygshell. H"
...
Setup_api codeinstall_exit install_exit (
Hwnd hwndparent,
Lpctstr pszinstalldir, // final install directory
Word cfaileddirs,
Word cfailedfiles,
Word cfailedregkeys,
Word cfailedregvals,
Word cfailedshortcuts
)
{
If (MessageBox (hwndparent, l "installation is complete, valid only after re-installation", l "prompt", mb_okcancel) = idok)
{
Exitwindowsex (ewx_reboot, 0 );
}
Return codeinstall_exit_done;
}
After completing setup. dll, add the DLL to the cab for packaging.
The specific addition operation is to select this setup. dll from Ce setupdll in the cab attribute.