MaxParticipantAugust 17, 2017 at 6:52 amPost count: 1
I have strange problem with executing a Powershell Script from Deploy-Application.ps1.
These Command should install all Visual C++ Runtimes but I always get errors cause of wrong command or file destination. I think it’s all about quotation marks 🙂
Maybe somebody can give me a hint how to set the marks in a correct order.
Execute-Process -FilePath "$env:WinDir\System32\WindowsPowerShell\v1.0\powershell.exe" -Parameters "-File "$DirFiles\Install-VisualCRedistributables.ps1" -Xml "$DirFiles\VisualCRedistributablesAll.xml" -Install" -WindowStyle 'Hidden'
Thank you in advance!
JimParticipantAugust 30, 2017 at 11:36 amPost count: 43
What you need to do is escape the quotes in the parameters with the backtick character, under the tilde symbol. Just put a backtick before each of the quotes in the parameters except the beginning and ending quotes. I can never get code to post correctly here, so this probably won’t work, but I’ll give it another try:
"$DirFiles\VisualCRedistributablesAll.xml" -Install" </p>
JimParticipantAugust 30, 2017 at 12:13 pmPost count: 43
Ok, I think I figured out how to post code… One more try. 🙂
Execute-Process -FilePath "$env:WinDir\System32\WindowsPowerShell\v1.0\powershell.exe" -Parameters "-File <code>"$DirFiles\Install-VisualCRedistributables.ps1” -Xml
"$DirFiles\VisualCRedistributablesAll.xml” -Install” -WindowStyle ‘Hidden’
Why don’t you just put the code from the Install-VisualCRedistributables.ps1 script directly in the Deploy-Application script?
Edit: It remove the backticks… 🙁 Well at least I’m getting closer… 🙂
You must be logged in to reply to this topic.