TRANSLATE TO PHP?
On Error Resume Next
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys
WScript.Echo subkey
Next
TRANSLATE TO PHP?
Moderator: General Moderators
-
Black Unicorn
- Forum Commoner
- Posts: 48
- Joined: Mon Jun 16, 2003 9:19 am
- Location: United Kingdom
Re: Translate to Php
As far as I know, PHP is run as a module under Apache, and can't directly change Windows Registry settings.
I wouldn't even know how to start solving a problem of this nature, but I could be wrong ... how about shell commands? PhP can do those, and if you make a little .NET or compiled VB thing you might be able to shell it using PhP so the desired effect is accomplished by proxy.
Other than that, I think I'll revisit this thread later again as it seems rather interesting.
Best of luck,
H
I wouldn't even know how to start solving a problem of this nature, but I could be wrong ... how about shell commands? PhP can do those, and if you make a little .NET or compiled VB thing you might be able to shell it using PhP so the desired effect is accomplished by proxy.
Other than that, I think I'll revisit this thread later again as it seems rather interesting.
Best of luck,
H
- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
PHP's Windows API extension: [php_man]w32api[/php_man]
It can do anything the API let's you do. But it will only act upon the same machine the server is on. It won't have any impact on the machine of someone who remotely accesses it (which is a security risk too).
See my note on that manual page for a link to Microsoft's site for the documentation about the API.
As for converting that code, what language is it in? And adding some comments might help too.
It can do anything the API let's you do. But it will only act upon the same machine the server is on. It won't have any impact on the machine of someone who remotely accesses it (which is a security risk too).
See my note on that manual page for a link to Microsoft's site for the documentation about the API.
As for converting that code, what language is it in? And adding some comments might help too.