windows - How to run system() as administrator in PHP? -
i need send commands system admin throught php system() function on windows environment.
i know can dangerous, need that.
i have solved issue using toolkit named cpau
by using can exec command simply:
cpau -u administrator -p pwd_here -lwp -ex "net user myuser mypwd /add" to make work i've needed change administrator password in computer management > users.
for people saying "use runas"
i not use runas because prompts password , can't pass in same command line.
ps: remember place cpau in php folder.
Comments
Post a Comment