I made some changes trying psexec, but it still isn't working. However, it runs perfectly from the command line. I think it's gotta be close and it may have something to do with quoting/escaping double quotation marks or /'s or \'s, but I don't know what it's looking for:
PHP Code:
error_reporting(E_ALL);
ini_set('display_errors', '1');
if($_POST['store_list'] && $_POST['start_date'] && $_POST['end_date']){
echo 'processing<br><br>';
$cmd = 'psexec \\<computername.domainname.com> -u <username> -p <password> -e c:\windows\system32\cscript.exe c:\scripts\labor\scheduled\labor.vbs /store_list:"store1;store2" /start_date:"2013-01-21" /end_date:"2013-01-24"';
echo $cmd.'<br><br>';
$out = shell_exec($cmd);
echo '[' . $out.']<br><br>';
echo '<br>end';
}
else{
echo 'no data';
}