Symbian Silent Installation and Deletion -[Symbian] 2010-03-26
copyright: reprinted in the form of hyperlink to indicate the original source and author information and the http://iovi.blogbus.com/logs/61145043.html of this statement
This problem has been used for theme management over the past few days.
First, you must use a non-public API
"Sdk api plug-in"
Http://wiki.forum.nokia.com/index.php/SDK_API_Plug-in "Wiki: Extended skins API"
Http://wiki.forum.nokia.com/index.php/Extended_Skins_API
The following is the installation, which can be synchronized or asynchronous. The following is synchronous. If it is asynchronous, you have to write an AO by yourself.
// Silent installer Swiui: rswinstsilentlauncher ilauncher; // Install option Swiui: tinstalloptions ioptions; // Installation option PKG Swiui: tinstalloptionspckg ioptionspckg;
Ioptions. iupgrade = swiui: epolicyallowed;
Ioptions. iocsp = swiui: epolicyallowed;
Ioptions. iDrive = 'C ';
Ioptions. iuntrusted = swiui: epolicyallowed;
Ioptions. icapabilities = swiui: epolicyallowed;
Ioptionspckg = ioptions;
Tbufc <50> fname (ktemppath); // path of the sisfile to be installed // Silent insatllation Ilauncher. Connect (); Ilauncher. silentinstall (/* waiter-> istatus, 8 */fname, ioptionspckg );
Ilauncher. Close (); Getsinkinfo (); Cakninformationnote * informationnote; Informationnote = new (eleave) cakninformationnote; Informationnote-> executeld (_ L ("silentinstall OK !! "));
The following is how to uninstall swiui: rswinstlauncher ilauncher; Cleanupclosepushl (ilauncher ); User: leaveiferror (ilauncher. Connect ());
Swiui: tuninstalloptions iuninstalloptions; Iuninstalloptions. ikillapp = swiui: epolicyallowed; Iuninstalloptions. ibreakdependency = swiui: epolicyallowed;
Swiui: tuninstalloptionspckg iuninstalloptionspckg (iuninstalloptions ); Ilauncher. silentuninstall (tuid: UID (0xa00000eb), iuninstalloptionspckg, swiui: ksisxmimetype ); Cleanupstack: popanddestroy (& ilauncher ); Ieikonenv-> infomsg (_ L ("silentuninstall OK "));
You can also detach a file synchronously or asynchronously.