Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <a href="index.php">Go back to index</a>
- | <a href="<?php echo $_SERVER["REQUEST_URI"];?>">Refresh</a>
- <title>Execute command</title>
- <h1>Execute command</h1>
- <pre style="background:#ddd">
- // Execution of commands may hang on Windows XP for some programs,
- // wmic.exe is one of them. The solution is to use a command like
- // this "echo | command...".
- $output = shell_exec("echo | {$_ENV['SYSTEMROOT']}\System32\wbem\wmic.exe path win32_computersystemproduct get uuid");
- if ($output) {
- echo "Command executed successfully.<br>";
- echo "Output: $output";
- } else {
- echo "Command failed.";
- }
- </pre>
- <?php
- // Execution of commands may hang on Windows XP for some programs,
- // wmic.exe is one of them. The solution is to use a command like
- // this "echo | command..."
- $output = shell_exec("echo | {$_ENV['SYSTEMROOT']}\System32\wbem\wmic.exe path win32_computersystemproduct get uuid");
- if ($output) {
- echo "Command executed successfully.<br>";
- echo "Output: $output";
- } else {
- echo "Command failed.";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment