Uninstall API
| Wed, 2005-09-07 10:14 | |
|
Does anyone know how I can uninstall an application programmatically, i.e. without using the phone or PC UI? I understand that the .sis file created on system\install holds info on the files to be removed at uninstall, but is there a command that is run with this .sis file as a parameter which will remove the application related to the .sis file?
|
|






Forum posts: 982
pirosl
Forum posts: 17
My question is: How Application Manager does uninstallation and if there is an API to do the same? Thanks for your help.
Forum posts: 982
pirosl
Forum posts: 45
Set the other fields appropiatedly, setting doc name (sis file name) and tail: cmdLine->SetTailEndL(_L("UNINSTALL")); and issue a RApaLsSession::StartApp()
Forum posts: 17
CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
cmdLine->SetLibraryNameL(_L("z:\\System\\Apps\\AppInst\\Appinst.app"));
cmdLine->SetDocumentNameL(_L("c:\\some_sis_file.SIS"));
cmdLine->SetCommandL(EApaCommandRun);
RApaLsSession ls;
User::LeaveIfError(ls.Connect());
CleanupClosePushL(ls);
User::LeaveIfError( ls.StartApp(*cmdLine) );
CleanupStack::PopAndDestroy(2); // cmdLine and ls
But when I changed the documentName to my uninstall SIS, I received an error (File corrupted).
...
cmdLine->SetDocumentNameL(_L("c:\\System\\Install\\ListOfUIDs.SIS"));
...
It will try with the UNINSTALL option and I will let you know about the result.
Forum posts: 17
I tried following code and I have still "File corrupted!" error message. But I used _L8("UNINSTALL") instead of _L("UNINSTALL"), because "const TDesC8 &" is requested:
CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
cmdLine->SetLibraryNameL(_L("z:\\System\\Apps\\AppInst\\Appinst.app"));
cmdLine->SetDocumentNameL(_L("c:\\System\\Install\\ListOfUIDs.SIS"));
cmdLine->SetTailEndL(_L8("UNINSTALL"));
cmdLine->SetCommandL(EApaCommandRun);
RApaLsSession ls;
User::LeaveIfError(ls.Connect());
CleanupClosePushL(ls);
User::LeaveIfError( ls.StartApp(*cmdLine) );
CleanupStack::PopAndDestroy(2); // cmdLine and ls
Any idea?
Forum posts: 17
1) Someone already faced the same problem as me: "Unfortunatly this seem not to work for series60 version 2.0, because it has not worked on the 6600 for us. If I remember it correctly, the installer seem to try to install it fails with a corrupt file message."
I am playing with Nokia 6680, it means, Symbian 8.0 series 60 v2 FP2.
2) there is instapp.h file in SDK:
// name of install app file
_LIT(KInstallAppName,"Instapp.app");
// NOTE: following must be given even length due to problem with
// CApaCommandLine::NewL(fullCmdLine)) in EikDll::StartAppL()!
// keywords at end of InstApp command line which tell it what to do
_LIT8(KUninstallCommandLineTail,"UNINSTALLX");
_LIT8(KInstallCommandLineTail,"INSTALLX");
/**
Constant shared between InstApp and InstCtrl
@publishedPartner
@released
*/
enum TInstallMode {EUninstall,EInstall};
... still facing the same problem, it means, any idea more than welcome!
Forum posts: 982
pirosl
Forum posts: 17
CInstallEngine is not supported in newer SDKs.
This header file was available in the Series60 1.2 SDK.
Do you think, that it could be still working, if I took the header file from version 1.2?
Does anyone have it? Did anyone try it?
I think, I have tried everything wat is available im my SDK... but nothing works.
Forum posts: 17
Forum posts: 982
CInstallEngine is not supported in newer SDKs.
This header file was available in the Series60 1.2 SDK.
Do you think, that it could be still working, if I took the header file from version 1.2?
Does anyone have it? Did anyone try it?
I think, I have tried everything wat is available im my SDK... but nothing works.
I think you can give a try....checking with the insteng.h from 1.2 sdk. You don't have anything to loose.....or?
pirosl
Forum posts: 17
Anyway... I was thinking, how the Application manager works.
I think, in first step, it just looks through all install directories to list all applications, which could be deleted (one application is equal to one reduced SIS file). In second step, when the user selects an application, it parses the SIS file and according to its content, it deletes files, etc.
I check the content of the reduced SIS file with WinHex editor and it really seems, that all information could be found in this file.
Is there any description of the SIS file and reduced SIS file structure?
Forum posts: 51
As for SIS the file format, details for it can be found at http://homepage.ntlworld.com/thouky/software/psifs/sis.html (thanks to Alexander Thoukydides).
Forum posts: 17
Thanks a lot SIS file format link... I would help me... In case I will succeed, I will let all know...
Forum posts: 214
"I only know that I know nothing." (Socrates)