Page 1 of 1

runtime option to turn on logged execution?

Posted: Sat Apr 15, 2006 9:58 am
by wolbrink
It's a bit cumbersome to have an end user run "setup.exe /l=c:\\log.txt" in order to get a log file. I was wondering if it were possible within my installation program to turn on logging within the ui, as an option. I'm thinking I'd discretely provide this option on the first wizard page before anything that interesting actually happens. Is this possible? If so, how might I best get started adding this.

Thanks,
Troy

Posted: Sat Apr 15, 2006 7:26 pm
by MichaelNesmith
There's a pre-defined variable for this, LOGGED. please look in the help index for pre-defined variables for details.

Posted: Sun Apr 16, 2006 6:18 pm
by wolbrink
MichaelNesmith wrote:There's a pre-defined variable for this, LOGGED. please look in the help index for pre-defined variables for details.


That's exactly what I needed. Thanks!

In my script, I'll check to see if it's blank. If it is blank (ie. the user hasn't specified it on the command line parameter), I'll generate a temporary file to use. Then at the end of the installation, I'll have a button to "View Log..." which will open it in notepad. In other words, I'll always be logging my installation, just in case it's actually needed.

--Troy

Posted: Sun Apr 16, 2006 7:06 pm
by MichaelNesmith
This is not recommended. Logging your setup significantly slows down the speed of your installation. It might be OK on small projects, but you really don't want to do it unless you have to.

Posted: Mon Apr 17, 2006 1:44 pm
by wolbrink
MichaelNesmith wrote:This is not recommended. Logging your setup significantly slows down the speed of your installation. It might be OK on small projects, but you really don't want to do it unless you have to.


You're right! It's really slow with logging! I'll provide the option via a check box before the installation begins.

--Troy