Creating a log file?
Posted 20 September 2003 - 13:48
Posted 20 September 2003 - 23:24
I do have logging setup in my IS projects for debugging/troubleshooting purposes, but it's own my own custom code and is mainly a series of debug messages to know what transpired.
Posted 22 September 2003 - 14:53
It is in a hidden folder.
You can view the contents using the appropriate version of the InstallShield Utility 'Log File Viewer'. (ISLogVu.exe)
Posted 22 September 2003 - 23:58
Edited by Taco Bell, 22 September 2003 - 23:58.
Posted 30 September 2003 - 05:07
Posted 30 September 2003 - 14:58
It logs the file name, date, and time attributes of every file ‘moved’ – installed. I added script to the Move Data – Installing File event.
The function LOG_File_Create(); opens the log file in append mode. You will have to write your own function to open and append to the file.
This script does not do all that you requested, but maybe it is a starting point.
// FUNCTION: OnInstallingFile(File)
// Purpose: To log all installed patched files in YourFileHere.log
// NOTE: This function is called in each component
// Added: 02/26/2002 TEB
if ( File % TARGETDIR ) then // if the full path in <File> has TARGETDIR then put in LOG file
LOG_File_Create(); // You need to write your own code to create and append to the log file of your choice.
ret = GetFileInfo ( File , FILE_DATE , nvResult , svDATE_ATTR );
if ret = 0 then
svDATE_ATTR = " Dated: " + svDATE_ATTR;
ret = GetFileInfo ( File , FILE_TIME , nvResult , svTIME_ATTR );
if ret = 0 then
svTIME_ATTR = " Time: " + svTIME_ATTR;
nvResult = StrLength ( File );
nvDifference = 26 - nvResult;
// Spacer to line up text in log file...
while nvDifference > 0
svSpacer = svSpacer + "=";
nvDifference = nvDifference - 1;
WriteLine ( nvLOG_FileHandle , "Installing patch file " + svSpacer + " " + File + svDATE_ATTR + svTIME_ATTR );
CloseFile ( nvLOG_FileHandle );
Posted 01 October 2003 - 14:16
Posted 01 October 2003 - 15:45
The same argument is in the default function OnUninstallingFile(File).
// FUNCTION: OnInstallingFile
// EVENT: Installing File event is sent before a file that is being installed
// ARGUMENTS: File - full path of file being installed
Posted 03 October 2003 - 09:48
Can this problem be overcomed? Can i give if(File%TARGETDIR | File%WINSYSDIR). pls suggest.
Posted 03 October 2003 - 14:11
Edited by Taco Bell, 03 October 2003 - 14:11.
Posted 08 October 2003 - 11:14
Posted 08 October 2003 - 14:32
Edited by Taco Bell, 08 October 2003 - 14:33.
Posted 08 October 2003 - 14:48
Your post dated 10-03-2003 stated that it worked fine logging into TARGETDIR but not the WINDIR. Removing the filter [ if ( File % TARGETDIR ) then ] will allow all files to be logged as suggested by Taco Bell. Below is a sample of what your log file should contain.
Installing patch file ====== C:\Alpha\Tkiscale.exe Dated: 2003\10\02 Time: 10:43:44
Installing patch file ======== C:\Alpha\TKPOST.EXE Dated: 2003\04\28 Time: 11:58:26
Installing patch file ======= C:\Alpha\TKPRICE.EXE Dated: 2003\04\24 Time: 10:2:32
Installing patch file ====== C:\Alpha\TKREXCEP.EXE Dated: 2003\04\24 Time: 9:33:12
Installing patch file ====== C:\Alpha\Tkrsale3.exe Dated: 2003\09\29 Time: 19:44:42
Without seeing your code I would just be guessing. Did you check to make sure that the String and Numeric variables defined locally in the function are not the same as some Global String and Numeric variables?