Passing response file in execute-process

Hello,
I am trying to package a software that has response file, i am using the below command but was getting error.
please help

Execute-Process  -path "$dirFiles\ca.exe" -parameters "-s --responsefile `"$dirFiles\response.properties`"" -windowstyle 'Hidden'

But from publisher site the below command works
ca.exe -f location\response_filename -i silent

Why did you use --responsefile if it was supposed to be -f ?

Execute-Process -path "$dirFiles\ca.exe" -parameters "-i silent -f `"$dirFiles\response.properties`""

I tied it installtion exited with 1001

Well I cant guess the correct parameters. What are you trying to install?

https://www.ibm.com/support/knowledgecenter/en/SSEP7J_11.0.0/com.ibm.swg.ba.cognos.inst_cr_winux.doc/t_c8bi_setupunattendedinstallation.html

IBM cognos Framework manager.
Windows: ca_srv_<platform>_<build>.exe -r “C:\ResponseFile\ResponseFile.properties” .

also -parameters not working its throwing script block error, -arguments throwing 1001

Parameters and Arguments are both valid for this function. Shouldnt be throwing an error. Based on the documentation the command is also correct, unless it did not get copied corectly.

Thanks, couldnt figure where I was doing wrong

Any suggestions please

What error is it giving you?

Thanks
I am using the below command line

Execute-Process -path "$dirFiles\ca.exe" -parameters "-i silent -f `"$dirFiles\response.properties`""
[31-03-2021 16:09:28] [Initialization] Hardware platform is [Virtual:Xen]
[31-03-2021 16:09:28] [Initialization] Computer name is [DESKTOp]
[31-03-2021 16:09:28] [Initialization] Current user is [DESKTOP\test]
[31-03-2021 16:09:28] [Initialization] Current Culture is [en-US] and UI language is [EN]
[31-03-2021 16:09:28] [Initialization] Deployment type is [Installation]
[31-03-2021 16:09:28] [Initialization] Script [C:\Users\test\Desktop\Cognos\Scripts\SiriusXMAppD
eployToolKit.ps1] dot-source invoked by [C:\Users\test\Desktop\Cognos\Deploy-Application.ps1]
[31-03-2021 16:09:28] [Initialization] The following users are logged on to the system: DESKTOP-\test
[31-03-2021 16:09:29] [Initialization] Running as [test] in user context.
[31-03-2021 16:09:29] [Initialization] Session 0 not detected.
[31-03-2021 16:09:29] [Initialization] Installation is running in [Interactive] mode.
[31-03-2021 16:09:29] [Installation] Working Directory is [C:\Users\test\Desktop\Cognos\Install]

[31-03-2021 16:09:29] [Installation] Executing [C:\Users\test\Desktop\Cognos\Install\ca_model_wi
n32_11.0.8.exe -i silent -f "C:\Users\test\Desktop\Cognos\Install\response.properties"]...
[31-03-2021 16:09:57] [Installation] Execution failed with exit code [1001]
[31-03-2021 16:09:57] [Installation] cognos Instal
lation completed with exit code [1001].
[31-03-2021 16:09:57] [Installation] -

I have used these parameters to install this software successfully in the past:

"-i silent -l de -f `"$dirFiles\response.txt`""

so I dont think the problem is there. Im thinking the problem is in the response file. Make sure it was created correctly. Try renaming it to .txt

Same error after changing to txt

Execute-Process -path "$dirFiles\ca_model_win32_11.0.8.exe"  -parameters "-i silent -f `"$dirFiles\response.properties`""

Try using full executable name “ca_model_win32_11.0.8.exe”

yes i was using full exe name

What does the response file look like?

Thu Apr 01 19:41:00 EDT 2021

Replay feature output

---------------------

This file was built by the Replay feature of InstallAnywhere.

It contains variables that were set by Panels, Consoles or Custom Code.

USER_INSTALL_DIR=C:\Program Files (x86)\ibm\cognos\model
BIMODEL_SHORTCUT=IBM Cognos Framework Manager
BIMODEL_ALLUSERS=0

#Install
#-------
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\Uninstall\ IBM\ Cognos\ Framework\ Manager.lax=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\resource\iawin32.dll=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\resource\win64_32_x64.exe=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\resource\remove.exe=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\resource\invoker.exe=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\license\bimodel\LA_cs=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\license\bimodel\LA_zh_TW=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\license\bimodel\LA_zh=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\license\bimodel\LA_tr=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\license\bimodel\LA_sl=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\license\bimodel\LA_ru=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\license\bimodel\LA_pt=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\license\bimodel\LA_pl=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\license\bimodel\LA_lt=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\license\bimodel\LA_ko=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\license\bimodel\LA_ja=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\license\bimodel\LA_it=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\license\bimodel\LA_in=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\license\bimodel\LA_fr=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\license\bimodel\LA_es=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\license\bimodel\LA_en=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\license\bimodel\LA_el=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\license\bimodel\LA_de=Yes
-fileOverwrite_C:\Program\ Files\ (x86)\ibm\cognos\model\license\bimodel\notices=Yes

Seems very similar to mine so it should work.

Good morning all,

just came across by accident ^.^
Two things that came to my mind and hopefully can lead further to the solution…
As the Log says, @anchearavind 's command is running in User-Context.
User’s are normally not allowed to (over)write Files and/or Folders within the ProgramFiles-Folders. - So give it a try running with elevated privileges.

The other thing is, that sometimes installers need to be called with an actual working directory, not providing a working directory somtimes lead to weird issues, so this might be worth a try, too.

Kind regards,

BaBa

I am running script in admin ps