How to execute a program using PHP ?? using $WshShell = new COM("WScript.Shell");

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • uinoma
    New Member
    • Oct 2006
    • 5

    How to execute a program using PHP ?? using $WshShell = new COM("WScript.Shell");

    I want to open notepad in fullscreen mode, but this script that I created can't do that. .

    When I open Windows Manager Task, the program is just run in background, not appeared on web server dekstop.

    Is the script wrong or missing something?

    Please check out this script and give me your ideas.

    <?
    $WshShell = new COM("WScript.Sh ell");
    $Return = $WshShell->Run("notepad ", 3, false);
    ?>

    Your example will be appreciated.

    Thanks! :)
  • bevort
    New Member
    • Jul 2006
    • 53

    #2
    try something like $return.visible = 1
    I do not realy know the correct syntax. Have seen it once

    Comment

    • uinoma
      New Member
      • Oct 2006
      • 5

      #3
      Originally posted by bevort
      try something like $return.visible = 1
      I do not realy know the correct syntax. Have seen it once
      Actually, I want run php.exe as background, to resolve time-out that happened when I run my scripts continously.
      I did set "set_time_limit " for more time that I need, but I get nothing.

      Thanks for your respons !

      Comment

      • vssp
        Contributor
        • Jul 2006
        • 268

        #4
        hai

        refer this link i hope its usefull for u


        http://p2p.wrox.com/topic.asp?which page=1&TOPIC_ID =48831&#108221

        vssp

        Comment

        • uinoma
          New Member
          • Oct 2006
          • 5

          #5
          thank u vssp
          but a want run it on web server not on client.
          i read that script on php help
          function exec() in User contributed notes:

          maybe i wrong on php.ini or on IIS configuration
          :)
          can you help me?

          Comment

          Working...