<?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);
?>
php操作注册表
最新推荐文章于 2021-12-04 16:52:25 发布