Jump to content

Exec .bat file not working?


kekec777

Recommended Posts

Hallo forum

 

Im runing IIS 8.5 (windows 8.1) and i want to execute a .bat file on my windows 8.1 from my home page..

 

So i create a link that opens test.php:

And here i want to call my test.bat (test.php and test.bat is located in the same folder)

test.bat content (tried all these options)

system('c:\WINDOWS\system32\cmd.exe /c C:\inetpub\www.kekec.dk\include\test.bat');

system('test.bat');
exec('c:\WINDOWS\system32\cmd.exe /c C:\inetpub\www.kekec.dk\include\test.bat');
exec('test.bat');
shell_exec("C:\windows\system32\cmd.exe /c test.bat");
shell_exec('test.bat');

 

My test.bat files content is (only for test):
%SystemRoot%\explorer.exe

 

This should open explorer on the host but what i managed to get is only the output:

C:\inetpub\www.kekec.dk\include>C:\Windows\explorer.exe 

 

please advise (and just to mention that im executing with my admin user from test.php- after i have logged in to my web-page)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.