0 Members and 4 Guests are viewing this topic.
shell_exec('C:\pg.exe');
shell_exec('echo test>tmp.txt');should write into the file tmp.txt in the soldatserver folder (when you started the exe it in that folder)
I assume you have scripting enabled (in server.ini)
32 or 64 bit?
Try this:WriteLn('Before shell_exec!');shell_exec('notepad.exe');WriteLn('After shell_exec!');
Another test:shell_exec('echo test>tmp.txt');
shell_exec tries to execute as follows: "command.com /c <yourcommand>". I'm not entirely sure if this isn't a little bit deprecated in windows 7.
Microsoft Windows [Version 6.1.7601]Copyright (c) 2009 Microsoft Corporation. All rights reserved.C:\Users\josephg>cd \C:\>command.com'command.com' is not recognized as an internal or external command,operable program or batch file.C:\>
I'm not sure if this workaround will help you but but maybe copy pasting cmd.exe in soldatservers folder and renaming it command.com will make it work.
Quote from: Shoozza on June 14, 2012, 12:20:35 pmI'm not sure if this workaround will help you but but maybe copy pasting cmd.exe in soldatservers folder and renaming it command.com will make it work.Doesn't Windows require executables to have the relevant file extension?
Quote from: Shoozza on June 14, 2012, 12:20:35 pmI'm not sure if this workaround will help you but but maybe copy pasting cmd.exe in soldatservers folder and renaming it command.com will make it work.It's work! For me the issue is resolved. Thank you to all for support!