Posted by Ian Hobson on 03/18/07 23:47
DC Hart wrote:
> I do not have a Win machine. This works in WINE.
>
> I have a very simple command like script that takes an IP address as
> the argument and then checks the TQMcube dnsbl for a listing.
>
> I packaged this in a zip along with a default php.ini, php.exe and
> php5ts.dll. The presumed instructions are to copy the four files to
> c:\windows with a warning not to overwrite anything that already
> exists.
>
> The expected result is to be able to type, from a command line;
>
> php.exe dnsbl.php [ip-address]
>
> Will this work?
No. Sorry to be bearer of bad tidings....
Not all versions of windows are installed into c:\windows or have the
equivalent on their path statement. Win2K using C:\winnt for example.
The traditional way to install a program is to copy it to a new subdir
under %ProgramFiles%. If you really want to install into C:\windows,
then install into %windir%.
If the user has already installed php, your approach will pick up his
php.exe and (probably) his php.ini because of the order on the path.
Opening and closing command prompt windows is simply not done in
windows, except as a techie kludge. Your users will not know how to do it.
Regards
Ian
[Back to original message]
|