Solved
Forum Discussion
AlexKaras
Champion Level 1
4 years agoHi,
Assume that pathvar contains the 'C:\Project' value:
your line of code
"powershell -file \"" + pathvar + "\\My Tests\\PickupTest.ps1"
will evaluate to
'powershell -file "C:\Project\My Tests\PickupTest.ps1'
which seems to be just incorrect (lack of closing double-quote -- check this in debugger)
Does it help if you change this line of code to this:
WshShell.Run("powershell -file \"" + pathvar + "\\My Tests\\PickupTest.ps1\"")
(note added \" at the end of code line)
TestQA1
4 years agoFrequent Contributor
Thanks very much Alex, I will try and get back. script is running with the space but sometimes does not. So I will trying to find the permanent way to resolve space between 'My Test' which as per Powershell forum could be fix using '&'.