We're currently evaluating Advanced Installer - I'd like to say that so far it's been a pleasure to use! One problem I'm having is getting a batch file to successfully run during installation. I've read all the documentation and forums posts I can find, but still have had no luck so far. I'm currently using "Launch File" to launch a bat file that I'm including in the install. I've configured the action to:
- 1) "Run as Administrator"
2) Execute "When the sytem is being modified (deferred)"
3) "Run under the LocalSystem account with full privileges (no impersonation)"
Code: Select all
echo Installing at %1
timeout /t 10Code: Select all
MSI (s) (5C:FC) [14:35:55:210]: Executing op: ActionStart(Name=CreateConfigFiles,,)
Action 14:35:55: CreateConfigFiles.
MSI (s) (5C:FC) [14:35:55:210]: Executing op: CustomActionSchedule(Action=CreateConfigFiles,ActionType=3074,Source=BinaryData,Target=/RunAsAdmin "C:\Program Files\Our Company\Our App\Utility\settings_cfg.bat" "C:\Program Files\Our Company\Our App\",)
CustomAction CreateConfigFiles returned actual error code 1 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (5C:FC) [14:35:55:600]: Note: 1: 1722 2: CreateConfigFiles 3: C:\Windows\Installer\MSI8B90.tmp 4: /RunAsAdmin "C:\Program Files\Our Company\Our App\Utility\settings_cfg.bat" "C:\Program Files\Our Company\Our App\"
Code: Select all
<COMPONENT cid="caphyon.advinst.msicomp.MsiCustActComponent">
...
<ROW Action="CreateConfigFiles" Type="3074" Source="viewer.exe_1" Target="/RunAsAdmin "[#settings_cfg.bat]" "[APPDIR]"" Options="1"/>
<ROW Action="LaunchFile" Type="2" Source="viewer.exe" Target=""<target file>"" WithoutSeq="true" Options="1"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiInstExSeqComponent">
...
<ROW Action="CreateConfigFiles" Condition="( NOT Installed )" Sequence="6401"/>
</COMPONENT>I've verified that the bat file exists where it should, and runs as expected when pasting the above arguments into a console window (I can test this when the error message pops up, before the installation rolls back). Any ideas on what could be wrong? I'm running out of variations to try.
Thanks for any help.
FOLLOW US
Get the latest news in Application Packaging