Help with syntax

Posted on 16th Feb 2014 by admin

Hi all!

The $bridge variable is not getting passed while it is contained in the line below:

Maybe I don't have the right brackets around it? I want the result to say Bridge1
I think it's because its a WshShell command. Any ideas?




$bridge = 1;

if ($refresh == 1)

{

$WshShell = new COM("WScript.Shell");
$WshShell->Run('"C:Program FilesApache Software FoundationApache2.2htdocsaastraputty.exe" -load "Bridge$bridge" -l root -pw password -m "C:Program FilesApache Software FoundationApache2.2htdocsaastralist-56201.sh"');

sleep(2);

}

Other forums