Write to Eventlog in an Inno Setup Script
30 Okt 2006 23:41 In Category:Delphi
1.
Create a simple console Application, which is capable
to write to the Windows Event Log. It should expect
the Versionnumber as a "Commandline Paramter", which
you can read with ParamStr(1). There is an Example
how to do this
here.
2. Install ISPP (Inno Setup Pre Processor). This can be done very easy with the "Inno Setup QuickStart Pack"
3. Read the Version Infomation in the Inno Setup Script (at the top) from the desired Application with GetFileVersion into a variable.
Example:
define #AVersionNumber GetFileVersion("..\MyApp.exe")
4. Call your Application, which writes to the Eventlog in the [Run] Section of the Inno Setup Script with the Version Number as the Parameter.
Example:
[Run]
Filename: "{app}MyApplication.exe"; Parameters: {#AVersionNumber}
2. Install ISPP (Inno Setup Pre Processor). This can be done very easy with the "Inno Setup QuickStart Pack"
3. Read the Version Infomation in the Inno Setup Script (at the top) from the desired Application with GetFileVersion into a variable.
Example:
define #AVersionNumber GetFileVersion("..\MyApp.exe")
4. Call your Application, which writes to the Eventlog in the [Run] Section of the Inno Setup Script with the Version Number as the Parameter.
Example:
[Run]
Filename: "{app}MyApplication.exe"; Parameters: {#AVersionNumber}