Symbian Silent Installation and uninstallation

Source: Internet
Author: User

I. Required header files:

# Include <swinstapi. h>
# Include <swinstdefs. h>

Ii. Required lib Library:

Swinstcli. Lib

3. Required capabilities:

Trustedui

4. Install the application:

_ Partition (ktemppath, "C: // siltest. sisx ");

Caosync * waiter = caosync: newl ();

Cleanupstack: pushl (waiter );

Ioptions. iupgrade = swiui: epolicynotallowed;
Ioptions. iocsp = swiui: epolicynotallowed;
Ioptions. iDrive = 'C ';
Ioptions. iuntrusted = swiui: epolicynotallowed;
Ioptions. icapabilities = swiui: epolicynotallowed;

Ioptionspckg = ioptions;


Tbufc <200> fname (ktemppath );

// Silent insatllation

Ilauncher. silentinstall (Waiter-> istatus, fname, ioptionspckg );

Waiter-> execute ();

Cleanupstack: popanddestroy (waiter );

5. Uninstall the application:

Const tuid kmyappuid = {0x12345678 };

// Silent insatllation

Swiui: tuninstalloptions options;
Swiui: tuninstalloptionspckg optionspckg;
Options. ikillapp = swiui: epolicyallowed;
Options. ibreakdependency = swiui: epolicyallowed;
Optionspckg = options;
Ilauncher. silentuninstall (kmyappuid, optionspckg, swiui: ksisxmimetype );

Vi. References:

S60_3rd_SDK_MR_API_Plug-In_Pack_v5_43

:

Http://www.forum.nokia.com/info/sw.nokia.com/id/53439e01-f605-4491-96f4-62d003bd4c0c/S60_3rd_SDK_MR_API_Plug-In_Pack1.zip.html

Silentinst.zip

Http://wiki.forum.nokia.com/images/2/2f/SilentInst.zip

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/brew2003/archive/2008/12/23/3587982.aspx

 

 

 

A simple synchronization method is used to uninstall a function.
//************************************** ***********
// Author: JEME
//************************************** ***********
Tbool deleteapplication (const tuint32 auid)
{
Tbool Re = etrue;
Tuid uid;
UID. iuid = auid;

Swiui: rswinstsilentlauncher;
Tint err = launcher. Connect ();
If (Err! = Kerrnone)
{
Re = efalse;
Return re;
}
Cleanupclosepushl (launcher );
Swiui: tuninstalloptions options;
Options. ibreakdependency = swiui: epolicyallowed;
Options. ikillapp = swiui: epolicyallowed;
Swiui: tuninstalloptionspckg optpckg (options );
Trequeststatus status = krequestpending;
Launcher. silentuninstall (status, uid, optpckg, swiui: ksisxmimetype ());
If (status! = Krequestpending)
{
Re = efalse;
}
While (status = krequestpending)
{
User: After (5000); // or you can do other things.
}
If (status! = Kerrnone)
{
Re = efalse;
}
Launcher. cancelasyncrequest (swiui: erequestsilentuninstall );
Cleanupstack: popanddestroy (& launcher );
Return re;
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.