Hi,
我在使用Silent Installer API 时有点问题,使用了下列代码,可以实现A程序安装B程序,却不能A程序重新安装A程序,就是为了实现程序的自我升级功能。
求大哥们帮忙。
code :
include <SWInstApi.h>
#include <SWInstDefs.h>
SwiUI::RSWInstSilentLauncher iLauncher;
SwiUI::TInstallOptions iOptions;
SwiUI::TInstallOptionsPckg iOptionsPckg;
iOptions.iUpgrade = SwiUI::EPolicyNotAllowed;
iOptions.iOCSP = SwiUI::EPolicyNotAllowed;
iOptions.iDrive = 'C';
iOptions.iUntrusted = SwiUI::EPolicyNotAllowed;
iOptions.iCapabilities = SwiUI::EPolicyNotAllowed;
iOptionsPckg = iOptions;
iLauncher.Connect();
TBufC<50> FName(KTempPath);
iLauncher.SilentInstall(waiter->iStatus,FName,iOptionsPckg);
iLauncher.Close();

Reply With Quote


