By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,313 Members | 2,798 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,313 IT Pros & Developers. It's quick & easy.

exec() on Windows

P: n/a
Gio
Hi all,
this is my problem: I need to "exec" the following command:

C:\Programmi\Soft\soft.exe -v -d C:\dati\$nomefile
C:\dati\pdf\$filename

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

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);
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");
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

Oct 6 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
This one looks closest:

exec("C:\\Programmi\\Soft\\soft.exe -v -d C:\\dati\\.$nomefile
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\Soft\soft.exe -v -d C:\dati\$nomefile
C:\dati\pdf\$filename

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

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);
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");
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
Oct 6 '06 #2

P: n/a
Gio wrote:
Hi all,
this is my problem: I need to "exec" the following command:

C:\Programmi\Soft\soft.exe -v -d C:\dati\$nomefile
C:\dati\pdf\$filename

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

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);
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");
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
Oct 6 '06 #3

P: n/a
Gio wrote:
Hi all,
this is my problem: I need to "exec" the following command:

C:\Programmi\Soft\soft.exe -v -d C:\dati\$nomefile
C:\dati\pdf\$filename

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

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);
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");
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:\\Programmi\\Soft\\soft.exe -v -d C:\\dati\\$nomefile
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.
js*******@attglobal.net
==================
Oct 6 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.