473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

exec() on Windows

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
3 3388
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Hal Vaughan | last post by:
I have a script used to find and run Java on a Windows system.  It worked fine on original tests (on a Windows XP system).  It's now running on a Windows 2000 (sp3) system, and it won't work -- the...
1
by: Hal Vaughan | last post by:
I've been using Runtime.exec() like this: Runtime rt = Runtime.getRuntime(); try {Process p = rt.exec("MyCommand.bat");} catch (Exception e) {do stuff} When I start my Java classes, I start...
1
by: James Goodwill | last post by:
Hello, We have a SQL 2000 installation (running on NT4 SP6a) with a database accessed by a client application. Currently the application logs into the database using a the SA account. I'd like...
2
by: Vaap | last post by:
I did lot of googling to see if I can solve the SQL server not found problem while trying to run ASP.Net community starter kit from an XP machine to Windows 2003 server hosting SQL server 2000...
17
by: comp.lang.tcl | last post by:
The TCL command I am using will do a command-line action on a PHP script: set cannotRunPHP I have to do it this way as both the TCL script and the PHP script run as CLI. However, "info.php"...
5
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
2
by: DaBrain | last post by:
I am no DBA, but this is my task. I have an SQL Server 2000 Database that has an "SQL Account" that has execute permission on all Stored procedures. it is what was used by the company. This...
26
by: warth33 | last post by:
Hello I have a php site. Some page needs to call an external program. The programs are home made c# applications. It uses to work without problem. For a while. Maybe it work for some hour....
23
by: Maarten | last post by:
Howdy, Recently I switched from a Windows PC to Mac OS-X 10.5 (php v5.2.6) and I have a little problem with one function within my cd-management script. For extracting a bit of info from my...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.