Forum Discussion

TestQA1's avatar
TestQA1
Frequent Contributor
3 years ago

Using variable reference in WshShell.Run("powershell -file path)

Hi ,

 

I used Sys.OleObject("WScript.Shell").Run("cmd /c \"" + serveraddress + "\\localpath\\test" + "testfile" ".bat\""); to run one of the bat files in Test Complete script. Here serveraddress is a remote server path.

How can I achieve the same in WshShell.Run("powershell -file path) please? I need to use variables in the path but dont know how to use them.

 

Thanks in advance!

No RepliesBe the first to reply