Page 1 of 2

Remote Registry

Posted: Wed Dec 22, 2004 9:00 am
by thekingster
Does anyone know if it is possible to access the registry on another machine on the network using php?

Rights are not an issue as the machine using it will be on as a domain admin.

I just want to query some keys to get information on version numbers and things like that.

Thanks in advance.

Posted: Wed Dec 22, 2004 9:37 am
by patrikG
You mean on a windows network? I am no expert on this particular subject, but if that was indeed possible, the Windows developers who implemented that should be fired, to be polite. That would be a gaping security hole waiting to be exploited.

Short answer: no. And thank god for that.

Posted: Wed Dec 22, 2004 10:34 am
by thekingster
Well I can do it in VB so why not through a http frontend?

I think you are missing my point, this is for intranet use only.

I basically want to run a php page on the server that will use IIS, and it will query all the machines on the network for things like virus software versions and install dates etc. All this info is held in the registry on the workstations.

It would be no different from going into the registry on the server and going to connect to remote registry, except if I wanted to check all the workstations I would have to connect to every registry on the network and manually check the keys when I would like it to all be on a nicely formatted web browser :D

Posted: Wed Dec 22, 2004 11:02 am
by onion2k
thekingster wrote:Well I can do it in VB so why not through a http frontend?
You might well be able to run a VB app on the server that queried the registry over the network and returned the data to PHP through an exec() or system() function call. But thats not really what you asked in your initial post, you asked if it was possible in PHP. Which its not.

Posted: Wed Dec 22, 2004 1:05 pm
by Joe
With PHP - No. Try perl ;)

Regards


Joe

Posted: Wed Dec 22, 2004 1:28 pm
by onion2k
Joe wrote:With PHP - No. Try perl ;)
Anything you can write in Perl is equally possible in PHP. Remotely querying a windows registry file is not possible in either.

Posted: Wed Dec 22, 2004 1:44 pm
by Joe
onion2k you are WRONG WRONG WRONG!!!

Posted: Wed Dec 22, 2004 1:50 pm
by onion2k
Am I? In what way?

Posted: Wed Dec 22, 2004 1:55 pm
by Joe
Remotely querying a windows registry file is not possible in either.
I can put a bet on it pal! :O)

Posted: Wed Dec 22, 2004 1:56 pm
by John Cartwright
Joe wrote:onion2k you are WRONG WRONG WRONG!!!
Lets try to keep this thread....... relevant and informative shall we?

Posted: Wed Dec 22, 2004 2:01 pm
by patrikG
Joe wrote:
Remotely querying a windows registry file is not possible in either.
I can put a bet on it pal! :O)
I'd be interested to see - show us :)

Posted: Wed Dec 22, 2004 2:03 pm
by onion2k
You are wrong there aswell. :O)
What does Perl give me access to that PHP doesn't? PHP has the same level of socket and IO access as Perl, so I can't imagine what you mean. Obviously Perl has CPAN, so code may already have been written to do various things, but thats hardly the same as saying the same things can't be done in PHP.

Posted: Wed Dec 22, 2004 2:07 pm
by Joe
patrikG wrote:
Joe wrote:
Remotely querying a windows registry file is not possible in either.
I can put a bet on it pal! :O)
I'd be interested to see - show us :)
It was at college I seen this perl script in action and I will try to get it after xmas and show you guys.

Posted: Wed Dec 22, 2004 2:09 pm
by Joe
onion2k, Perl can offer different things than PHP as can PHP offer different things to Perl. Lookup on it and see for yourself :)

Posted: Wed Dec 22, 2004 2:09 pm
by patrikG
Joe wrote:
patrikG wrote:
Joe wrote: I can put a bet on it pal! :O)
I'd be interested to see - show us :)
It was at college I seen this perl script in action and I will try to get it after xmas and show you guys.
That's a word. I bet a round of Xmas cookies (good ones, not the crappy ones) against it :)

Could be persuaded to change the cookies to a round of beers ;)