现在的位置: 首页 > 综合 > 正文

php操作注册表

2014年01月27日 ⁄ 综合 ⁄ 共 491字 ⁄ 字号 评论关闭

<?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);

?>

抱歉!评论已关闭.