本文整理汇总了PHP中COM::setPassword方法的典型用法代码示例。如果您正苦于以下问题:PHP COM::setPassword方法的具体用法?PHP COM::setPassword怎么用?PHP COM::setPassword使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COM
的用法示例。
在下文中一共展示了COM::setPassword方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: windows_create_kloxo_service
function windows_create_kloxo_service()
{
$OWN_PROCESS = 16;
$NOT_INTERACTIVE = False;
$NORMAL_ERROR_CONTROL = 2;
$objWMIService = new COM("winmgmts:{impersonationLevel=impersonate}//./root/cimv2");
$objService = $objWMIService->Get("Win32_BaseService");
$user = new COM("WinNT://./lxlabs");
$user->setPassword("lxlabspass");
$user->setInfo();
try {
//$objService->Create("LxaServer" ,"LxaServer" ,'"C:/Program Files/lxlabs/ext/lxhttpd/Apache2/bin/Apache.exe" -k runservice -f "c:/Program Files/lxlabs/ext/lxhttpd/Apache2/conf/httpd.conf"', $OWN_PROCESS, $NORMAL_ERROR_CONTROL, "Automatic", $NOT_INTERACTIVE, ".\lxlabs", "lxlabspass");
$objService->Create("LxaMultiplexer", "LxaMultiplexer", '"C:/Program Files/lxlabs/ext/Multiplexer/MultiplexerSrvc.exe"', $OWN_PROCESS, $NORMAL_ERROR_CONTROL, "Automatic", $NOT_INTERACTIVE, ".\\LocalSystem", "");
} catch (Exception $e) {
print " ERROR: {$e}";
}
$colListOfServices = $objWMIService->ExecQuery("Select * from Win32_Service Where Name = 'LxaMultiplexer' or Name = 'LxaServer'");
foreach ($colListOfServices as $objService) {
$objService->StartService();
print "\n Done \n";
}
}
示例2: changePassword
function changePassword()
{
$obj = new COM("WinNT://./{$this->main->nname}");
$obj->setPassword($this->main->realpass);
$obj->setInfo();
}