PDA

View Full Version : Creating a log file ??



jagdishprabhu
09-18-2003, 01:28 AM
How can i find which all files got installed onto target system, which files were read only(locked), which files got replaced alongwith thier version nos., which files got updated where, location? This has to be captured in a log file after installation is finished. Any suggestion or help?

niranbhimaiah
09-18-2003, 07:41 AM
The OnInstallingFile(File) event will give you the file name being installed with target directory path. You can write a function and call in this event to get all the required details and write to a log file

Regards
Niran Bhimaiah

jagdishprabhu
09-18-2003, 08:06 AM
But how can i get the status of file? File locked / shared did it update the file with new version. like suppose i run exe which is self extract and how can i track whether that file has replaced the exisiting ones.

niranbhimaiah
09-18-2003, 10:55 PM
As I mentioned earlier you need to write a function to get the details.

Is (FILE_LOCKED, szIsData); will let you know whether the target file is locked or not.

Use GetFileInfo (szPathName, nType, nvResult, svResult); to get FILE_SHARED_COUNT, FILE_SIZE, FILE_DATE, etc.

You can use a sample availabe at the following link to get the version info from a installed file and compare with the file you are installing.

Check the "Read ProductVersion from File" at this link http://www.installsite.org/
Under InstallScript Samples/Components and Files


Hope this info will help.

Regards
Niran Bhimaiah

jagdishprabhu
09-29-2003, 02:34 AM
ur solution didn't worked as OnInstallingFile () gives the path as C:\Program Files\Install Shield..............) and not the targetdir path. I can't even put my log creation function in onMoving as i dodn't have file names. Any other solutions?