Remote Registry

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

thekingster
Forum Newbie
Posts: 3
Joined: Wed Dec 22, 2004 8:57 am

Remote Registry

Post 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.
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post 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.
thekingster
Forum Newbie
Posts: 3
Joined: Wed Dec 22, 2004 8:57 am

Post 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
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post 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.
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

With PHP - No. Try perl ;)

Regards


Joe
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post 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.
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

onion2k you are WRONG WRONG WRONG!!!
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

Am I? In what way?
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

Remotely querying a windows registry file is not possible in either.
I can put a bet on it pal! :O)
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Joe wrote:onion2k you are WRONG WRONG WRONG!!!
Lets try to keep this thread....... relevant and informative shall we?
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post 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 :)
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post 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.
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post 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.
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post 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 :)
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post 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 ;)
Post Reply