Executbatch file in php to run commands in administrator modeing
<p>i have a batch file which executes command.i have created a shortcut for the batch file and i have set it to run as administrator in shortcut advanced option.when i execute this shortcut through cmd i am able to see the execution.but i want to call the same shortcut from php i am unable to do it...please help</p>

<p>my batch file:
name of the file:servicetest.bat</p>

<pre><code> echo Set UAC = CreateObject^("Shell.Application"^) &gt; "%temp%\admin.vbs"
 echo UAC.ShellExecute "%~s0", "", "", "runas", 1 &gt;&gt; "%temp%\admin.vbs"
 "%temp%\getadmin.vbs"
 del "%temp%\getadmin.vbs"


//  code to run with elevation here
ECHO.&amp;PAUSE&amp;GOTO:EOF
</code></pre>

<p>Name of the shortcut:
servicetest.bat - shortcut</p>

<p>my php file:</p>



<p>i tried with shell_exec,system 
nothing worked out...</p>
