×
Namespaces

Variants
Actions

如何在程序中启动安装程序卸载某应用

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata

文章
huwell 在 30 Jun 2007 创建
最后由 hamishwillee 在 15 Dec 2011 编辑
  • 开发伙伴平台:

Series 80


  • 说明:

下列代码展示了如何在程序中启动安装程序卸载某应用,在“c:\system\install\”下有相应程序.SIS文件,它包含了程序安装的信息。我们要进行的卸载操作就是要将.PKG中所有生成的文件都删除干净,以及c:\system\install\目录下相关的.SIS文件。

#include <apacmdln.h>
#include <eikdll.h>
#include <instapp.h>
 
CApaCommandLine* cmdLine;
cmdLine=CApaCommandLine::NewLC();
cmdLine->SetLibraryNameL(
_L("z:\\System\\apps\\instapp\\instapp.app"));
cmdLine->SetDocumentNameL(
_L("c:\\system\\install\\MyApplication.sis"));
cmdLine->SetCommandL(EApaCommandRun);
cmdLine->SetTailEndL(KUninstallCommandLineTail);
EikDll::StartAppL(*cmdLine);
CleanupStack::PopAndDestroy(); // cmdLine
This page was last modified on 15 December 2011, at 13:20.
38 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×