PDA

View Full Version : Extend SB-Event-Log filename automatically



NewsArchive
07-20-2011, 04:00 AM
Hi Friedrich,

I have the following problem:

I use the /E2 switch to specify the folder and file name for the event log.

Example:

setup.exe /E2
C:\Users\Administrator\Appdata\myCompany\Logs\2011-07-19_15-18-21.txt

If my setup detects, that it runs on a "real" terminal server
(application server) and the server is running in execution mode, it
switches the server into installation mode (by calling
%SYSDIR32%\change.exe USER /INSTALL) and restarts itself with all actual
command line parameters.

Now, there is a conflict between the sb event log from the first process
and from the second process.

As a solution, I suggest a new parameter /E3.

The behaviour of /E3 should be identical to /E2 except that /E3 checks,
whether the file already exist. If the file exists, it adds (x) just
before the file extension. x is an consecutive number, starting with 2.

Example:
setup.exe /E3 c:\logfile.txt

If "c:\logfile.txt" exists, SB would use "c:\logfile(2).txt".

If "c:\logfile(2).txt" also exist, SB would use "c:\logfile(3).txt" and
so on.

In addition, I would like to query the actual used log file name with
the full path. This could be done by extend the function "Get System Info".

What do you think?

Thanks in advance.

Markus

NewsArchive
07-20-2011, 04:00 AM
Hi Markus,

> As a solution, I suggest a new parameter /E3.
>
> The behaviour of /E3 should be identical to /E2 except that /E3 checks,
> whether the file already exist. If the file exists, it adds (x) just
> before the file extension. x is an consecutive number, starting with 2.
>
> Example:
> setup.exe /E3 c:\logfile.txt
>
> If "c:\logfile.txt" exists, SB would use "c:\logfile(2).txt".
>
> If "c:\logfile(2).txt" also exist, SB would use "c:\logfile(3).txt" and
> so on.

No problem. We can add a new /E3 command line switch to achieve the above.

> In addition, I would like to query the actual used log file name with the
> full path. This could be done by extend the function "Get System Info".

No problem. We can add a new option to the "Get System Info" function to
retrieve the name of the event log file.

Friedrich

NewsArchive
07-20-2011, 04:01 AM
Thank you!

Markus Zander

NewsArchive
09-01-2011, 01:21 AM
Added!

---
IMPROVEMENT: [SB#107192] Installer: The /E3 event logging mode command line
option lets you set the folder (optional) and name of the event
logging file (/E3 "[folder\]filename"). This creates an unique
event logging file. If the filename is not unique, then a
number in round braces will be added to the filename before
the extension, and will continue adding numbers until the
filename is unique.

IMPROVEMENT: [SB#107193]: Add "Event Log Filename" option to the "Get System
Info..." script function to retrieve the name of the event log
file.

---

Thanks,

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder is Windows 7 installation -- "point. click. ship"

-- Official Comodo Code Signing and SSL Certificate Partner