note 61069 added to ref.exec

From: Date: Tue, 24 Jan 2006 20:21:10 +0000
Subject: note 61069 added to ref.exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-102393@lists.php.net to get a copy of this message
I got the system() function to execute commands, but the command I want to execute is the massive dsadd command below. for /F "eol=; tokens=1,2,3,4,5,6,7,8 delims=," %a in (output.txt) do dsadd user "cn=%b %a,ou=Testing,dc=mtmercy,dc=edu" -samid %a%b -fn %a -ln %b -display "%b, %a" -pwd %d -email %a%b@mtmercy.edu -disabled no -empid %c -desc Student I've had limited success creating users in MS active directory 2003 so I decided to try dsadd. The problem is the quotes that are in the command itself as well as the % signs. The quotes are interpreted by php and the % signs are interpreted wrong in batch files. Any thought on this would be appricated. ---- Server IP: 64.71.164.2 Probable Submitter: 192.251.94.253 ---- Manual Page -- http://www.php.net/manual/en/ref.exec.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+61069 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61069&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61069&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61069&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61069&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61069&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61069&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61069&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+61069&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#102393) next »