Exe paramater issue

Hi, I am pretty new to this toolkit and was hoping someone could please help or push me in the right direction.
I am running the below:

Execute-Process -Path “$dirFiles\setup.exe” -Parameters “/SP /verysilent /SUPPRESSMSGBOXES /norestart /FORCECLOSEAPPLICATIONS /loadinf=”$dirFiles\unattended.ini" /log="$configToolkitLogDir\Install.txt"" -WindowStyle ‘Hidden’

But for some reason it isn’t happy with what I have specified as its erroring with directory name invalid for /log="$configToolkitLogDir\Install.txt"
I have played around with the quotes but still complains about the path not being found.

If i hardcode the path it has no issues, any help would be appreciated

You’re misunderstanding the use of $configToolkitLogDir. You instead want to configure Toolkit_LogPath by opening AppDeployToolkitConfig.xml and set Toolkit_LogPath to your desired path for logfiles (eg, C:\Temp). Then in your Deploy-Application.ps1, just specify the log’s file name. No need for the full path.

Similarly, you don’t need to specify $dirFiles, either. As long as your setup files are in the Files directory, you can get away with not including $dirFIles. It’s only when your setup files are in subdirectories of Files that you need to specify $dirfiles. (eg, Execute-Process “$dirFIles\bin\setup.exe”)

Your command would then look like:

Execute-Process -Path “setup.exe” -Parameters “/SP /verysilent /SUPPRESSMSGBOXES /norestart /FORCECLOSEAPPLICATIONS /loadinf=unattended.ini /log=Install.log” -WindowStyle Hidden

Note that I tweaked your double quotes (you had a mix of straight and curly quotes) and removed some single quotes (not needed for such things as -Window Style). Perhaps that was just a result of copy/paste into your question, but the particular quotes you use can bite you in the ass.

1 Like

Thanks for the response, I will try that out