This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Create Instalaltion log file.
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 20, 2008
12:35 PM
Create Instalaltion log file.
hi,
i am looking for a way to log all the result of my installer during installation, perhaps a way to control the occurring events as well.e.g lets say a file is being copied, but file copy operation fails, but sucessfull installation of my product does not depends on just copying of this file, i want to be able to detect this and report it in the dedicated installation log file.
Is there a way?
TIA
i am looking for a way to log all the result of my installer during installation, perhaps a way to control the occurring events as well.e.g lets say a file is being copied, but file copy operation fails, but sucessfull installation of my product does not depends on just copying of this file, i want to be able to detect this and report it in the dedicated installation log file.
Is there a way?
TIA
(14) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 20, 2008
12:43 PM
What type of project are you using? Windows Installer setups can create an ASCII log file detailing what has occured, but InstallScript projects do not. If you want an MSI style log in an InstallScript installer you are going to have to write the code to do this.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 20, 2008
12:48 PM
There are lot of file related functions in InstallScript, like OpenFile, CreateFile, OpenFileMode, WriteLine etc. Write a custom function to create the log file using the above functions and call it in each event function.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 20, 2008
01:52 PM
There are entrys in this forum that explain how to create these logs.
MSISCRIPT -
http://community.macrovision.com/showthread.php?t=174986
INSTALLSCRIPT - http://community.macrovision.com/showthread.php?t=180218
MSISCRIPT -
http://community.macrovision.com/showthread.php?t=174986
INSTALLSCRIPT - http://community.macrovision.com/showthread.php?t=180218
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 20, 2008
02:19 PM
Happy Days wrote:
There are lot of file related functions in InstallScript, like OpenFile, CreateFile, OpenFileMode, WriteLine etc. Write a custom function to create the log file using the above functions and call it in each event function.
Verbose doesn't seems to be best choice as suggested by some of the members, considering what you have suggested , how would I trap file copying etc and any other internal event that occurs during installation?
I am using MSI Installscript project.
TIA
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 21, 2008
12:37 PM
In installscript. I believe this will also work in a MSI InstallScript project.
//---------------------------------------------------------------------------
// OnInstallingFile
//
// The OnInstallingFile event is called when a file is about to be installed
// as a result of FeatureTransferData or FeatureMoveData.
//
// szFile will contain the full path of file about to be installed.
//---------------------------------------------------------------------------
function OnInstallingFile(szFile)
begin
//Write szFile to your logfile here.
end;
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 22, 2008
01:46 PM
jchristman wrote:
In installscript. I believe this will also work in a MSI InstallScript project.
//---------------------------------------------------------------------------
// OnInstallingFile
//
// The OnInstallingFile event is called when a file is about to be installed
// as a result of FeatureTransferData or FeatureMoveData.
//
// szFile will contain the full path of file about to be installed.
//---------------------------------------------------------------------------
function OnInstallingFile(szFile)
begin
//Write szFile to your logfile here.
end;
Hi,
Function OnInstallingFile(szFile) doesnt seems to be available in MSI Installscript project and I also dont see any alternative to this in MSi installscript project?????????????????????
Any clue?
TIA
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 29, 2008
03:55 PM
Gvarma wrote:
Hi,
Function OnInstallingFile(szFile) doesnt seems to be available in MSI Installscript project and I also dont see any alternative to this in MSi installscript project?????????????????????
Any clue?
TIA
Any clues? also how to I log my custom script actions/functions results in MSI Installscript project?
TIA
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 29, 2008
03:58 PM
If you are using an InstallScript MSI project you should be able to use the built in logging for Windows Installer.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 29, 2008
06:20 PM
esiemiat wrote:
If you are using an InstallScript MSI project you should be able to use the built in logging for Windows Installer.
Eric,
What is that and how to go about it?
TIA
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 30, 2008
09:08 AM
It is all laid out in the this link.
But here is the gist of it.
Media
- Releases
-release 1
- properties show up in the right pane
- choose the setup.exe tab
- MSI Command Line Options
Enter in this line something like this "/L*ve "%TEMP%\Install.log"
This puts the log file "Install.log" in the users TEMP directory, you could do C:\Install.log the "/L*ve" logs everything in verbose and errors. a complete log of everything going on. 😄
But here is the gist of it.
Media
- Releases
-release 1
- properties show up in the right pane
- choose the setup.exe tab
- MSI Command Line Options
Enter in this line something like this "/L*ve "%TEMP%\Install.log"
This puts the log file "Install.log" in the users TEMP directory, you could do C:\Install.log the "/L*ve" logs everything in verbose and errors. a complete log of everything going on. 😄
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 30, 2008
10:10 AM
jchristman wrote:
It is all laid out in the this link.
But here is the gist of it.
Media
- Releases
-release 1
- properties show up in the right pane
- choose the setup.exe tab
- MSI Command Line Options
Enter in this line something like this "/L*ve "%TEMP%\Install.log"
This puts the log file "Install.log" in the users TEMP directory, you could do C:\Install.log the "/L*ve" logs everything in verbose and errors. a complete log of everything going on. 😄
Ahhh the great Verbose switch again...
Well above option would include whatever is part of MSI but stuff that I am doing using installscripts (without any custom action)...wouldnt be included..this is what i am looking for..somehow I can put errors occured during execution of my Installscript code as well along with MSI.
ANy idea?
TIA
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 30, 2008
11:47 AM
you can do a couple of things, you can either open the log file and do a write to it with in installscript or write out a second logfiel and at the end append it to the main logfile. Either can be done with InstallScript.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 30, 2008
12:19 PM
jchristman wrote:
you can do a couple of things, you can either open the log file and do a write to it with in installscript or write out a second logfiel and at the end append it to the main logfile. Either can be done with InstallScript.
Gotcha...
I guess following what you suggested, if could use try and catch to catch any exception that might occur on the event where return value is not possible.
Thanks again!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 30, 2008
02:27 PM
i do somthing like this
nResult = ListGetFirstString(listID,svString);
if (nResult = END_OF_LIST) then
RecordtoLogFile("Reached End of List - " + nResult);
endif;
nResult = ExistsDir(svString);
if ( nResult < 0) then
RecordtoLogFile("Directory does not Exist - " + nResult)
endif;
RecordtoLogFile is a function that got from the InstallScript thread I posted in here earlier.
nResult = ListGetFirstString(listID,svString);
if (nResult = END_OF_LIST) then
RecordtoLogFile("Reached End of List - " + nResult);
endif;
nResult = ExistsDir(svString);
if ( nResult < 0) then
RecordtoLogFile("Directory does not Exist - " + nResult)
endif;
RecordtoLogFile is a function that got from the InstallScript thread I posted in here earlier.
![](/skins/images/8C9D13A71C7F7695F3262372C0172D68/responsive_peak/images/icon_anonymous_message.png)