exec() on Windows

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gio

    exec() on Windows

    Hi all,
    this is my problem: I need to "exec" the following command:

    C:\Programmi\So ft\soft.exe -v -d C:\dati\$nomefi le
    C:\dati\pdf\$fi lename

    and i tried to execute it in php with (one of) the following lines....

    exec("C:\Progra mmi\Soft\soft.e xe -v -d C:\dati\.$nomef ile
    C:\dati\pdf\.$f ilename");
    exec("C:\Progra mmi\Soft\soft.e xe" -v -d "C:\dati\".$nom efile
    "C:\dati\pdf\". $filename);
    exec("C:\\Progr ammi\\Soft\\sof t.exe -v -d C:\\dati\\.$nom efile
    C:\\dati\\pdf\\ .$filename");
    exec("C:/Programmi/Soft/soft.exe -v -d C:/dati/.$nomefile
    C:/dati/pdf/.$filename");
    exec("C:/Programmi/Soft/soft.exe" -v -d "C:/dati/".$nomefile
    "C:/dati/pdf/".$filename );

    but there is something wrong and that i.. do not understand...
    Is there anyone so kind to show me the correct line and a couple of
    comments on how to built it? I tried to search for it (manual,
    newsgroups...) but i haven't found it (and my mistakes are the result
    :-P)

    Thanks in advance,
    Giorgio

    System:
    Windows 2000 Server (Italian)
    PHP 4.4.4
    Apache 2.0.59
    Mysql 4.1.21

  • ZabMilenko

    #2
    Re: exec() on Windows

    This one looks closest:

    exec("C:\\Progr ammi\\Soft\\sof t.exe -v -d C:\\dati\\.$nom efile
    C:\\dati\\pdf\\ .$filename");


    But are those periods supposed to be there?



    Gio wrote:
    Hi all,
    this is my problem: I need to "exec" the following command:
    >
    C:\Programmi\So ft\soft.exe -v -d C:\dati\$nomefi le
    C:\dati\pdf\$fi lename
    >
    and i tried to execute it in php with (one of) the following lines....
    >
    exec("C:\Progra mmi\Soft\soft.e xe -v -d C:\dati\.$nomef ile
    C:\dati\pdf\.$f ilename");
    exec("C:\Progra mmi\Soft\soft.e xe" -v -d "C:\dati\".$nom efile
    "C:\dati\pdf\". $filename);
    exec("C:\\Progr ammi\\Soft\\sof t.exe -v -d C:\\dati\\.$nom efile
    C:\\dati\\pdf\\ .$filename");
    exec("C:/Programmi/Soft/soft.exe -v -d C:/dati/.$nomefile
    C:/dati/pdf/.$filename");
    exec("C:/Programmi/Soft/soft.exe" -v -d "C:/dati/".$nomefile
    "C:/dati/pdf/".$filename );
    >
    but there is something wrong and that i.. do not understand...
    Is there anyone so kind to show me the correct line and a couple of
    comments on how to built it? I tried to search for it (manual,
    newsgroups...) but i haven't found it (and my mistakes are the result
    :-P)
    >
    Thanks in advance,
    Giorgio
    >
    System:
    Windows 2000 Server (Italian)
    PHP 4.4.4
    Apache 2.0.59
    Mysql 4.1.21
    >

    Comment

    • Colin Fine

      #3
      Re: exec() on Windows

      Gio wrote:
      Hi all,
      this is my problem: I need to "exec" the following command:
      >
      C:\Programmi\So ft\soft.exe -v -d C:\dati\$nomefi le
      C:\dati\pdf\$fi lename
      >
      and i tried to execute it in php with (one of) the following lines....
      >
      exec("C:\Progra mmi\Soft\soft.e xe -v -d C:\dati\.$nomef ile
      C:\dati\pdf\.$f ilename");
      exec("C:\Progra mmi\Soft\soft.e xe" -v -d "C:\dati\".$nom efile
      "C:\dati\pdf\". $filename);
      exec("C:\\Progr ammi\\Soft\\sof t.exe -v -d C:\\dati\\.$nom efile
      C:\\dati\\pdf\\ .$filename");
      exec("C:/Programmi/Soft/soft.exe -v -d C:/dati/.$nomefile
      C:/dati/pdf/.$filename");
      exec("C:/Programmi/Soft/soft.exe" -v -d "C:/dati/".$nomefile
      "C:/dati/pdf/".$filename );
      >
      but there is something wrong and that i.. do not understand...
      Is there anyone so kind to show me the correct line and a couple of
      comments on how to built it? I tried to search for it (manual,
      newsgroups...) but i haven't found it (and my mistakes are the result
      :-P)
      >
      Thanks in advance,
      Giorgio
      >
      System:
      Windows 2000 Server (Italian)
      PHP 4.4.4
      Apache 2.0.59
      Mysql 4.1.21
      >
      WHAT is wrong? How do you expect anybody to help you debug it if you
      don't say what happens?

      Colin

      Comment

      • Jerry Stuckle

        #4
        Re: exec() on Windows

        Gio wrote:
        Hi all,
        this is my problem: I need to "exec" the following command:
        >
        C:\Programmi\So ft\soft.exe -v -d C:\dati\$nomefi le
        C:\dati\pdf\$fi lename
        >
        and i tried to execute it in php with (one of) the following lines....
        >
        exec("C:\Progra mmi\Soft\soft.e xe -v -d C:\dati\.$nomef ile
        C:\dati\pdf\.$f ilename");
        exec("C:\Progra mmi\Soft\soft.e xe" -v -d "C:\dati\".$nom efile
        "C:\dati\pdf\". $filename);
        exec("C:\\Progr ammi\\Soft\\sof t.exe -v -d C:\\dati\\.$nom efile
        C:\\dati\\pdf\\ .$filename");
        exec("C:/Programmi/Soft/soft.exe -v -d C:/dati/.$nomefile
        C:/dati/pdf/.$filename");
        exec("C:/Programmi/Soft/soft.exe" -v -d "C:/dati/".$nomefile
        "C:/dati/pdf/".$filename );
        >
        but there is something wrong and that i.. do not understand...
        Is there anyone so kind to show me the correct line and a couple of
        comments on how to built it? I tried to search for it (manual,
        newsgroups...) but i haven't found it (and my mistakes are the result
        :-P)
        >
        Thanks in advance,
        Giorgio
        >
        System:
        Windows 2000 Server (Italian)
        PHP 4.4.4
        Apache 2.0.59
        Mysql 4.1.21
        >
        Try:

        exec("C:\\Progr ammi\\Soft\\sof t.exe -v -d C:\\dati\\$nome file
        C:\\dati\\pdf\\ $filename");

        Also,

        exec("C:/Programmi/Soft/soft.exe -v -d C:/dati/$nomefile
        C:/dati/pdf/$filename");

        should work (Windows understands '/' - just the command interpreter
        doesn't).

        --
        =============== ===
        Remove the "x" from my email address
        Jerry Stuckle
        JDS Computer Training Corp.
        jstucklex@attgl obal.net
        =============== ===

        Comment

        Working...