View Issue Details

IDProjectCategoryView StatusLast Update
0001117Inno Script StudioFeaturepublic2018-02-24 14:55
Reportermindworker Assigned Totimchilvers  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformWindowsOSWindows 7OS VersionWindows 7 64 Bit
Product Version2.1 
Fixed in Version2.2 
Summary0001117: Batch file not run properly in Post Compile Section
DescriptionDear NG,
I try to run a batch file in order to copy the setup file in the post compile section.
Since I updated to version 2 of Script Studio, there is just a console window with red background, flashing up for half a second and nothing happened. No files copied. When I run the batch file manually by double clicking or via CMD-prompt, everything works fine.
Steps To ReproduceCreate a batch file with an XCOPY command like
XCOPY sourcefile.xyz targetpath
Try to run this batch file in post compile section
Additional InformationHere is the entry from the logs:

[PostCompile] Processing.
[PostCompile] Processing is still being tested.
Running: D:\Projects\Test\copy_files.bat
Console output log:
  >
  > D:\Projects\Test>XCOPY "D:\Projects\Test\Output\setup_test.exe" "K:\Target\setup_files\" /Y
Process Exit Code: 0
[PostCompile] Processing finished.
TagsNo tags attached.
Attached Files
test_script.bat (35 bytes)
install_test.iss (1,693 bytes)   
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "MyProg.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{813F7846-FE9C-40F8-A3A6-D81FA3E74AA2}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "C:\Program Files (x86)\Inno Setup 5\Examples\MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

[PostCompile]
Name: "test_script.bat"; Flags: cmdprompt
install_test.iss (1,693 bytes)   

Activities

mindworker

2013-05-30 10:57

reporter   ~0000760

With version 1.0.0.x of Script Studio the batch file was run as required.

timchilvers

2013-05-30 12:19

administrator   ~0000761

Test batch and Inno Setup script uploaded

These confirm the issue/ temporary workaround

timchilvers

2013-05-30 12:20

administrator   ~0000762

Issue confirmed in 2.1.0.20

timchilvers

2013-05-30 12:23

administrator   ~0000763

The issue shows when to option to redirect output to the compile log is selected.

When the option is removed the batch file runs correctly and in the test the file iscopied using xcopy fine.

timchilvers

2013-06-12 18:35

administrator   ~0001031

The redirection of the console output required a In Pipe to be created to correctly allow the redirection of the output pipes.

This has been added in version 2.2

Issue History

Date Modified Username Field Change
2013-05-30 10:54 mindworker New Issue
2013-05-30 10:57 mindworker Note Added: 0000760
2013-05-30 11:46 timchilvers Assigned To => timchilvers
2013-05-30 11:46 timchilvers Status new => acknowledged
2013-05-30 12:18 timchilvers File Added: test_script.bat
2013-05-30 12:19 timchilvers File Added: install_test.iss
2013-05-30 12:19 timchilvers Note Added: 0000761
2013-05-30 12:20 timchilvers Note Added: 0000762
2013-05-30 12:20 timchilvers Status acknowledged => confirmed
2013-05-30 12:23 timchilvers Note Added: 0000763
2013-06-12 18:35 timchilvers Note Added: 0001031
2013-06-12 18:35 timchilvers Status confirmed => resolved
2013-06-12 18:35 timchilvers Fixed in Version => 2.2
2013-06-12 18:35 timchilvers Resolution open => fixed
2018-02-24 14:55 timchilvers Status resolved => closed