Write to Install Log - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

FergusMurray
Posts: 150
Joined: Thu Sep 30, 2010 10:44 am

Write to Install Log

I'm trying to write to the install log from my vbscripts, this all used to work ok, but doesnt seem to be working anymore (not sure if thats down to AI upgrade or something in my projects)

I use a common function as part of my project vbs file and just call it anytime i want to write to the log, should this method still work?

Code: Select all

Function WriteToLog(TextToWrite)
  Const MsgType = &H04000000
  Set rec = Installer.CreateRecord(1)
  rec.StringData(1) = TextToWrite
  
  Session.Message MsgType, rec
  'Msgbox TextToWrite
WriteToLog = 0
End Function
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Write to Install Log

Hello,

The script seems to correspond with our related user guide article:
http://www.advancedinstaller.com/user-g ... ction.html

You can try to debug the entire script and find the mistake. You can use MsgBox occurrences or here's a good place to start.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
FergusMurray
Posts: 150
Joined: Thu Sep 30, 2010 10:44 am

Re: Write to Install Log

Hi Mihai,

There is no error in the vbscript, in fact the whole script runs fine without any error logged

The issue is that there is no tracability since the logging function doesnt actually write to the log file, and without that i have no visibility of what is happening inside my custom vbs

Regards,
Fergus.
FergusMurray
Posts: 150
Joined: Thu Sep 30, 2010 10:44 am

Re: Write to Install Log

Looks like "enable verbose logging" had found its way to be unchecked, ive reticked it and now my messages appear

Return to “Common Problems”