首页 > 代码库 > powershell

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() 
}