INNO Cmd Line

114 views
Skip to first unread message

Kenneth

unread,
Sep 30, 2022, 8:43:13 AM9/30/22
to inno...@googlegroups.com

I have written a Windows batch file that reads a list on ISS files that need to be compiled. So far, it works fine.

My question is, how do I pipe messages (good or bad) to a report file? I tried /LOG=rpt.txt and was not successful.

Is there a command line switch that I can use for this purpose?

 

Thank you in advance for any assistance.

 

Kenneth Ives

 

My code:

 

SET INNOCMPL="C:\Program Files (x86)\Inno Setup 6\ISCC.exe"

           …

           …

:: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

:: Here is where the actual compiles are performed.

::

:: Use 'FOR /F' loop to loop thru the list of file names

::   - Test the first char to see IF is a semicolon 'eol=;'.

::     IF so, it is a comment line which does not need to be  processed.

::   - Read the file names one line at a time

::   - Increment counter '/A' means add. When using arithmetic

::     variables, use '!' instead of '%'

::   - Display a count and file name on the screen

::   - Perform compile and write a remark to a report file

::   - Loop until finished

::

:: BTW.  IF there are any spaces in path\filename,

::       use 'usebackq'. All path\filenames should be

::       encapsulated with double quotes.

::

:: BTW.  Arithmetic variables use '!' instead of '%'

::

:: BTW.  Recommend ' ) ELSE ( ' statement always be on a

::       separate line. Less problems and easier to debug.

:: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

FOR /F "eol=; usebackq tokens=*" %%f IN (%CMPLIST%) DO (

    SET /A CNT+=1

    IF !CNT! LSS 10 (

        SET NBR=0!CNT!

        ) ELSE (

        SET NBR=!CNT!

        )

    ECHO    !NBR! %%f

::    %INNOCMPL% /Q %%f /LOG=%RPTFILE%   ß  Did not work

    %INNOCMPL% /Q %%f                  ß  Did work

   )

 

Bill Stewart

unread,
Oct 2, 2022, 7:42:32 PM10/2/22
to innosetup
On Friday, September 30, 2022 at 6:43:13 AM UTC-6 Kenneth wrote:

I have written a Windows batch file that reads a list on ISS files that need to be compiled. So far, it works fine.

My question is, how do I pipe messages (good or bad) to a report file? I tried /LOG=rpt.txt and was not successful.

Is there a command line switch that I can use for this purpose?

Does output redirection not work?

Kenneth Ives

unread,
Oct 11, 2022, 6:27:48 AM10/11/22
to innosetup
 /Log is not working.   ex: /LOG="C:\Temp\Rpt.txt"
I tried piping ">" and that was definitely not working.
Any suggestions would be appreciated.

Kenneth Ives

unread,
Oct 11, 2022, 6:41:20 AM10/11/22
to innosetup
Here is what I get when piping the results:

Inno Setup 6 Command-Line Compiler
Copyright (C) 1997-2022 Jordan Russell. All rights reserved.
Portions Copyright (C) 2000-2022 Martijn Laan. All rights reserved.
Portions Copyright (C) 2001-2004 Alex Yackimoff. All rights reserved.
https://www.innosetup.com

 
-------------------------------------
End of report 

Martijn Laan

unread,
Oct 11, 2022, 6:48:14 AM10/11/22
to inno...@googlegroups.com
Op 11-10-2022 om 12:41 schreef Kenneth Ives:
Here is what I get when piping the results:

Looks like you're only redirecting stdout and not stderr.

Just stdout: iscc > c:\temp\rpt.txt
Both: iscc > c:\temp\rpt.txt 2>&1

Greetings,
Martijn

Op 11-10-2022 om 12:41 schreef Kenneth Ives:
--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/innosetup/d047978f-1e89-4824-94da-faccd48f41b0n%40googlegroups.com.

Kenneth Ives

unread,
Oct 12, 2022, 7:56:56 PM10/12/22
to innosetup
Martin, thanks for replying. This is what I have for the compile line w/o using variables for my explanation only.

"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /Q "C:\Kens Software\Kenaso_ISS\ki_AnotherReboot.iss" > "C:\Kens Software\MyBackups\ISS_Rpt.txt" 2>&1

I get nothing in the report file.  I do not understand the 2>&1  on the end. Please explain. Maybe I can fix it at my end.

Thanks again.

Gavin Lambert

unread,
Oct 12, 2022, 9:49:21 PM10/12/22
to inno...@googlegroups.com
On 13/10/2022 12:56, Kenneth Ives wrote:
> Martin, thanks for replying. This is what I have for the compile line
> w/o using variables for my explanation only.
>
> "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /Q "C:\Kens
> Software\Kenaso_ISS\ki_AnotherReboot.iss" > "C:\Kens
> Software\MyBackups\ISS_Rpt.txt" 2>&1
>
> I get nothing in the report file.  I do not understand the 2>&1  on the
> end. Please explain. Maybe I can fix it at my end.

/Q tells the compiler to only output error messages. So if you're not
seeing anything, it means there were no errors. Remove that option if
you want to see output that isn't errors. This is documented in the
fine help file.

2>&1 is a standard shell syntax that simply redirects standard error to
the same place as standard output (which is in turn redirected by
>filename). Read about it using your search engine of choice if you
want more details.

Kenneth Ives

unread,
Oct 17, 2022, 6:29:21 AM10/17/22
to innosetup
Gavin, Martin,
Back in town and getting caught up.

My command line looks like this in a For loop:
        %INNOCMPL% /Q %%f >> %RPTFILE% 2>&1

I researched 2>&1 chell command and forced an error to test error output and got this:

---------------------------------------------------
Error on line 88 in C:\Kens Software\Kenaso_ISS\ki_AnotherReboot.iss: Source file "C:\Kens Software\AnotherReboot\Doc\xxShutdown_MS.txt" does not exist.
Compile aborted.

Inno Setup 6 Command-Line Compiler
Copyright (C) 1997-2022 Jordan Russell. All rights reserved.
Portions Copyright (C) 2000-2022 Martijn Laan. All rights reserved.
Portions Copyright (C) 2001-2004 Alex Yackimoff. All rights reserved.
https://www.innosetup.com

Usage:  iscc [options] scriptfile.iss
or to read from standard input:  iscc [options] -
Options:
  /O(+|-)            Enable or disable output (overrides Output)
  /O<path>           Output files to specified path (overrides OutputDir)
  /F<filename>       Overrides OutputBaseFilename with the specified filename
  /S<name>=<command> Sets a SignTool with the specified name and command
  /Q                 Quiet compile (print error messages only)
  /Qp                Enable quiet compile while still displaying progress
  /D<name>[=<value>] Emulate #define public <name> <value>
  /$<letter>(+|-)    Emulate #pragma option -<letter>(+|-)
  /P<letter>(+|-)    Emulate #pragma parseroption -<letter>(+|-)
  /I<paths>          Emulate #pragma include <paths>
  /J<filename>       Emulate #include <filename>
  /{#<string>        Emulate #pragma inlinestart <string>
  /}<string>         Emulate #pragma inlineend <string>
  /V<number>         Emulate #pragma verboselevel <number>
  /?                 Show this help screen

Example: iscc /$c- /Pu+ "/DLic=Trial Lic.txt" /IC:\INC;D:\INC scriptfile.iss
---------------------------------------------------

Why am I receiving this data, starting with "Usage: iscc", on both good and bad compiles?
Is there any way to get a message that says "No errors" or "Good compile"?

Thank you for sticking with me on this.

Bill Stewart

unread,
Oct 17, 2022, 5:53:13 PM10/17/22
to innosetup
On Monday, October 17, 2022 at 4:29:21 AM UTC-6 Kenneth Ives wrote:

Why am I receiving this data, starting with "Usage: iscc", on both good and bad compiles?

This is likely because your script is running iscc without correct parameters.
 
Is there any way to get a message that says "No errors" or "Good compile"?

Check the exit code of iscc.exe.
Reply all
Reply to author
Forward
0 new messages