PDA

View Full Version : User/'my' log file



NewsArchive
01-30-2009, 12:53 PM
Friedrich,

If I wanted to keep my own 'log' of the install progress, what would be a
suitable file in which to keep that?

INI?....

This would obviously be quite different info to SB's own uninstall log... (I
am planning to try to design an install that can continue after failure of
an included sub-program)
So I don't want to 'get in the way' of the sb file.

Steve

NewsArchive
01-30-2009, 12:55 PM
Steve,

> If I wanted to keep my own 'log' of the install progress, what would be a
> suitable file in which to keep that?
>
> INI?....
>
> This would obviously be quite different info to SB's own uninstall log...
> (I am planning to try to design an install that can continue after failure
> of an included sub-program)
> So I don't want to 'get in the way' of the sb file.

What about using the "Handle Text File Operation..." script function.

See attached source code screenshot and MyLog.sb6 project. It creates a
c:\test folder and a MyLog.txt. Then it writes some dummy operations into
the log.

What do you think?

Friedrich

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

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
01-30-2009, 12:55 PM
Very interesting.. let me play with it.

I'm figuring on something like creating "step numbers" for the (sub-program)
file converters... logging as each one is *successfully* completed.
And then wrapping each section of the installer in an "if step < x.." to see
whether to proceed with a re-install from that point on, or skip that
section

Or something like that! <G>

Tx for the pointer...
Steve

NewsArchive
01-30-2009, 12:56 PM
Steve,

> Very interesting.. let me play with it.
>
> I'm figuring on something like creating "step numbers" for the
> (sub-program) file converters... logging as each one is *successfully*
> completed. And then wrapping each section of the installer in an "if
> step < x.." to see whether to proceed with a re-install from that point
> on, or skip that section
>
> Or something like that! <G>

I like your idea very much!

If you have to re-run the installer because one converter "failed", read the
converter log file and see what completed successfully (you can use the same
function to handle this). Then continue from where it left off. Cool idea!

Friedrich

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

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
01-30-2009, 12:56 PM
> If you have to re-run the installer because one converter "failed", read
> the
> converter log file and see what completed successfully (you can use the
> same
> function to handle this). Then continue from where it left off. Cool
> idea!

You got it.

So I would use 'my' log file ... which I suppose would need to be named on a
version-based schema (so that the installer knew *which* to read, in the
event there was one or more left undeleted... although a deletion would
normally be the last step, if all converters were successful).

Clarify for me if you would: "you can use the same function to handle
this" - you mean that you can use the 'Handle text Fie..' feature for both
read & write, yes?

It occurs to me that the program in question *does* have a lightly-used INI
file... I could even create a new 'section' in there for the version (eg
"[File Conversion v5.501]") and use the single item entry (eg
"LastConvertStep=3").

Any reason occur to you why not to use the (SB) INI functions as opposed to
the (SB) 'Handle Text File..'.. functions?

Thanks for the consult <g>
Steve

NewsArchive
01-30-2009, 12:57 PM
Hi Steve,

> You got it.
>
> So I would use 'my' log file ... which I suppose would need to be named on
> a version-based schema (so that the installer knew *which* to read, in the
> event there was one or more left undeleted... although a deletion would
> normally be the last step, if all converters were successful).
>
> Clarify for me if you would: "you can use the same function to handle
> this" - you mean that you can use the 'Handle text Fie..' feature for both
> read & write, yes?
>
> It occurs to me that the program in question *does* have a lightly-used
> INI file... I could even create a new 'section' in there for the version
> (eg "[File Conversion v5.501]") and use the single item entry (eg
> "LastConvertStep=3").
>
> Any reason occur to you why not to use the (SB) INI functions as opposed
> to the (SB) 'Handle Text File..'.. functions?
>
> Thanks for the consult <g>

:)

I suggested to use the "Handle Text File Operation..." because with this
function you are not bound on a specific format. And yes, you can use
it to both read/write.

But if you plan to use the INI format (good idea)

[File Conversion v5.501]
LastConvertStep=3

then of course, the "Edit INI File..." and "Get INI Value..." script
functions work perfect.

At the end of the conversion process (if all converters were successful),
use the "Delete File(s)..." function to remove the converter .log. At the
beginning of your installation, use "If File/Folder Exists..." to check for
the converter .log. If it is found, you know that one of the previous
converters failed.

Friedrich

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

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner