<?php
$shell = new com("WScript.Shell") or die("This is thing requires Windows Scripting Host");
$reg_path1 = $shell->RegRead("HKEY_LOCAL_MACHINE//SYSTEM//CurrentControlSet//Control//Session Manager//Environment//Path");
//echo $reg_path1;
$reg_path = $reg_path."c://php";
//$shell->Environment("system")->Item("path") = $shell->Environment("system")->Item("path").";"."c://php";
$shell->RegWrite("HKEY_LOCAL_MACHINE//SYSTEM//CurrentControlSet//Control//Session Manager//Environment//Path",$reg_path,REG_EXPAND_SZ);
?>