How to exec a external Windows Prog ?
Moderator: General Moderators
-
DarK DragoN
- Forum Newbie
- Posts: 3
- Joined: Sun Jul 13, 2003 7:39 am
How to exec a external Windows Prog ?
Hi
I want to exec a Windows Prog. from php so that this prog started on my local System
like this :
c:\Progamme\wincmd\wincmd.exe
the prog must be started on my local PC not on Server
I've tested with system(), passthru(), popen(), escapeshellcmd()
but nothing of them starts my windows prog
If anyone can help
thanks for
I want to exec a Windows Prog. from php so that this prog started on my local System
like this :
c:\Progamme\wincmd\wincmd.exe
the prog must be started on my local PC not on Server
I've tested with system(), passthru(), popen(), escapeshellcmd()
but nothing of them starts my windows prog
If anyone can help
thanks for
-
DarK DragoN
- Forum Newbie
- Posts: 3
- Joined: Sun Jul 13, 2003 7:39 am
I did it by using system(), cmd (Linux, XP, 2000, 2003) and the path to your program…
It might not work on your computer if you don’t have proper permissions for internet user…
I have no idea how to deal with Linux, but on windows you just go and set execute permission for I_USER (or something like that), and also don’t forget to allow execute files on your web site in IIS manager…
But again I’m 100% windows person so I can’t speak about other then MS products…
It might not work on your computer if you don’t have proper permissions for internet user…
I have no idea how to deal with Linux, but on windows you just go and set execute permission for I_USER (or something like that), and also don’t forget to allow execute files on your web site in IIS manager…
But again I’m 100% windows person so I can’t speak about other then MS products…
-
DarK DragoN
- Forum Newbie
- Posts: 3
- Joined: Sun Jul 13, 2003 7:39 am
yes to redhair
client pc
this is the code
no flashfxp.exe starts
All the manuals I found are self than php manual and there is nothing about exec under Windows
My System runnig Server and php
Win2k Server
Apache 2.x
php 4.3x
client pc
this is the code
Code: Select all
$prog="D:\Programme\flashfxp2\FlashFXP.exe";
$data=$username.":".$password."@".$host.":".$port.$path;
$getdata = $prog." ".$data;
$process2=exec($getdata);
if(!$process2) {
echo "<p>Error : bla bla bla</p>";
}All the manuals I found are self than php manual and there is nothing about exec under Windows
My System runnig Server and php
Win2k Server
Apache 2.x
php 4.3x
Like I said try to set execute permission for folder D:\Programme\flashfxp2\
For “IUSR_<machine_name>”
In users list just find IUSR_... it is only one there,
If you wouldn’t do it win 2000 will block the command and return 404.2 error
PS: unless you have default permission set, (all everything for everyone){in that case I sagest you to remove EVERYONE group and set up proper permission for your folder, just for security reasons…)
For “IUSR_<machine_name>”
In users list just find IUSR_... it is only one there,
If you wouldn’t do it win 2000 will block the command and return 404.2 error
PS: unless you have default permission set, (all everything for everyone){in that case I sagest you to remove EVERYONE group and set up proper permission for your folder, just for security reasons…)
Well if he is talking about remote machine, you can still do it and you still have to use CMD console:
You can play with NET command (search Microsoft or TechNet for NET or NET USE), it might help you to get what you want, but tactically it will look like you are trying to hack your client machine through the web interface… and power of the server…
You can play with NET command (search Microsoft or TechNet for NET or NET USE), it might help you to get what you want, but tactically it will look like you are trying to hack your client machine through the web interface… and power of the server…
- redhair
- Forum Contributor
- Posts: 300
- Joined: Fri May 30, 2003 4:36 pm
- Location: 53.23N-6.57E
- Contact:
As said, php can not start something on a client.
...simply because php is server based.
You must have some sort of client running on the client machine, wich will be activated when the php script on the server machine 'asks' something of the client machine.
For example...you could install php/apache on the client...have the server retreive a script on the client machine, and let that script execute something on the client machine.
...simply because php is server based.
You must have some sort of client running on the client machine, wich will be activated when the php script on the server machine 'asks' something of the client machine.
For example...you could install php/apache on the client...have the server retreive a script on the client machine, and let that script execute something on the client machine.
To redhair: yes and no, if the client has win2000, XP, or 2003 then you just can play with console ( yes it is no so many things you can do with it, but still)... Well if the client is running Me, 98, 95, 3.1 there will be big limitation on remote controll and remote managment... (And I have no ideas about linux, unix, sun, hp, palm, mac - those platforms are out of my certification...)
-
Tubbietoeter
- Forum Contributor
- Posts: 149
- Joined: Fri Mar 14, 2003 2:41 am
- Location: Germany
You can do this with php, if you got telnet running.
See the link for details:
http://www.devnetwork.net/forums/viewto ... highlight=
See the link for details:
http://www.devnetwork.net/forums/viewto ... highlight=