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

install.log format

1 replies · 1,353 views · Started 04 October 2004

Does anyone knows the format of install.log file in c:\system\install\.
After updating my program from internet I want to add a line in the install.log file to mark that my program was updated.
The first 6 bytes of each record seems to be the date, but what all others means? Please help :icon4:

Finally, found what I need 😊)


#ifndef InstallLog_h
#define InstallLog_h

#include <e32std.h>

struct TInstallLogHeader
{
TInt32 iX1;
TInt32 iX2;
TInt32 iX3;
TInt32 iX4;
TInt32 iX5;
TInt32 iRecordsCount;
};
struct TInstallLogRec
{
TInt16 iYear;
TInt16 iMonth;
TInt16 iDay;
TInt16 iHour;
TInt16 iMinute;
TInt16 iSecond;//not sure
TInt16 iInstallType;//0 == install, 1 == remove, 2 == partialInstall
TUint8 iNameLengthX4;
};
class TLogReader
{
public:
static void ReadLogFile(const TDesC& aFileName);
};
#endif


void TLogReader::ReadLogFile(const TDesC& aFileName)
{
RFs fs;
if (KErrNone != fs.Connect())
return ;
CleanupClosePushL(fs);
RFileReadStream stream;
if (KErrNone != stream.Open(fs, aFileName, EFileRead))
{//unable to open file
CleanupStack::PopAndDestroy();//fs
return ;
}
CleanupClosePushL(stream);
TInstallLogHeader header;
stream.ReadL((TUint8*) &header, sizeof(header));
TBuf8<64> appName;

for (TInt i = 0;i < header.iRecordsCount;i++)
{
TInstallLogRec record;
stream.ReadL((TUint8*) &record, 15);//be aware of allign
stream.ReadL(appName, record.iNameLengthX4/4);
}
CleanupStack::PopAndDestroy(2);//fs, stream
}

If anyone find out what the xxx fields means please post here, or mail to [email][email protected][/email]