Re: Run system command from PHP

From: Date: Fri, 30 Jul 2004 14:30:23 +0000
Subject: Re: Run system command from PHP
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-24295@lists.php.net to get a copy of this message
>I am trying to modify the registry by running a *.reg dynamically created by PHP. I am having trouble gettting the file to >execute from within PHP. I actually create a *.reg file and save it. I then try to run it from PHP. I've tried using exec, >system, shell_exec() and none seem to actually work. I don't get an error message either. This is correct, as the web-server does not have a valid hWnd to send any error prompts to. >When I run the *.reg file from a cmd window, it works fine. I also noticed that it prompts the user once and then >confirms the change using some alert box mechanism (windows builtin). >Is there anyway to do this? Depends on how much programming you know... you would either use the Win32API extension and link directly into the system calls for creating regsitry keys (prolly difficult), or you could make/buy/find for free a COM object that simplifies this process (a lot simpler). Mikey

« previous php.windows (#24295) next »