powershell

start-service Wecsvc
stop-service Wecsvc

 

 

$USER ="dosapp"
(Get-Content D:\system.ini) | ForEach-Object { $_-replace "woafont=.+","woafont=$user" } | Set-Content D:\system.ini

 

function Set-RegistryValue($key, $name, $value, $type="String") { 
  if ((Test-Path $key) -eq $false) { md $key | Out-Null } 
       Set-ItemProperty $key $name $value -type $type 
  } 

 

function Get-RegistryValues($key) { 
                 (Get-Item $key).GetValueNames() 
}

posted on 2014-08-18 23:08  rosizel  阅读(107)  评论(0编辑  收藏  举报