Convert one liner batch file code to psadt

Hi,

I have been trying but did not succeed, i allways get syntax errors.

this is the one liner of the batch file

C:\tools\eid-web-browser-mw-install-1.4.2.exe “”-options "“eid-web-browser-installer.config “-language nl””

the following is not working and have tried several others including using $dirFiles but still no luck but i am also a rookie in powershell. My guess it has to do with the multiple " " why it is not working

Start-ADTProcess -FilePath ‘eid-web-browser-mw-install-1.3.2.exe’ -ArgumentList “-options eid-web-browser-installer.config -language eng”

V3 of psadt would be like: -ArgumentList “-options (back tick)”$difrfiles\eid-web-browser-installer.config(back tick)" -language eng"

edited: back ticks not showing.

v4, i havent ran a .ini or config file for an app yet from the files folder. id assume it would be like:

-ArgumentList “-options $($ADTsession.difrfiles)\eid-web-browser-installer.config -language eng”

Thanks,

this worked perfectly, backticks to the resque and didn’t read that we needed to use adtsession.dirfiles.

Final code was:

Start-ADTProcess -FilePath 'eid-web-browser-mw-install-1.4.2.exe' -ArgumentList "-options `"$($adtSession.DirFiles)\eid-web-browser-installer.config`" -language nl"
1 Like

N.B. Wrap the code in a code block using the </> button on the toolbar and you can get backticks to show

2 Likes

FYI: I usually edit posts just to make code readable by adding back tics ( ` ) but I’ll bow out of this thread.

2 Likes