Read-only archive of the All About Symbian forum (2001–2013) · About this archive

How to uninstall app using residual SIS file

4 replies · 3,846 views · Started 13 September 2005

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?

I need to be able to remove applications for Nokia 6680 remotely using a third party software without user intervention.

Thanks a lot ...

The only official way is to run the installer with the SIS file name and the uninstall command, but this requires user-interaction (user has to confirm that he/she wants to uninstall the package).

Another option is to parse the residual SIS file yourself and delete the files that have been installed, but since the SIS file format is not documented, this is troublesome.

These residual SIS files essentially only contain the names of the source and destination files from the installation. I've found that on a 9500, the offset to the table of installed files always starts at file offset 76H (32 bit integer). Every table entry consists of 6 32 bit entries. I haven't been able to figure out what all the entries mean (probably installation flags), but the first entry is the start of the source filename, and the third entry is the start of the target file name.

To get the filenames that are installed you could walk the table, by reading every third entry and read everything up to the next first entry. This is the file that is installed. Unfortunately, I haven't been able to figure out how to determine the number of files, but since all file names are stored towards the end of the SIS file, if you get an offset which lies outside the file size or which is smaller than the previous one, you've probably reached the end.

An example from the table in Bounce.sis from my 9500 (starting at offset 76H):


81 0A 00 00 <-- start of first source filename (0A81)
54 00 00 00
C5 0A 00 00 <-- start of first target filename (0AC5)
FE 2D 00 00
73 1D 00 00
68 32 00 00
19 0B 00 00 <-- start of second entry source filename (0B19)
56 00 00 00
5F 0B 00 00 <-- start of second entry target filename (0B5F)
8C 1D 00 00
62 4B 00 00
D4 1F 00 00
B5 0B 00 00 <-- start of third entry source filename
etc
So, to read the first installed file, seek to file position 0AC5 and then read all bytes up to (but not including) 0B19. A filenames are stored as unicode strings.

Hope this helps.

Greath Job!. Really i want to ask you a pleasure, that is to advertise here on this forum a link with the source code you create.

Also I have to create a code that allow me to "install and unistall a nstandard SIS file without interaction with the user" with my Nokia 6680. Can anyoneelse help me?