×
Namespaces

Variants
Actions

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

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

文章
User:Jiangbaolan 在 02 Apr 2009 创建
最后由 hamishwillee 在 15 Dec 2011 编辑

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

Code:

  1. include <apacmdln.h>
  2. include <eikdll.h>
  3. 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 09:36.
29 page views in the last 30 days.
×