View Single Post
Old 01-30-2013, 08:43 PM   PM User | #3
Raphael
New Coder

 
Join Date: Mar 2009
Posts: 70
Thanks: 3
Thanked 3 Times in 3 Posts
Raphael is an unknown quantity at this point
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';

Raphael is offline   Reply With Quote