#
# 부팅시 Install2를 자동으로 실행한다.
#
#################################################################
param
(
[string]$ParamOption
)
Function StartUpInstall
{
param([string]$ParamOption )
$RegStartUp= "HKLM\Software\Microsoft\Windows\CurrentVersion\Run"
if ($ParamOption -eq "/u")
{
Remove-ItemProperty $RegStartUp -Name Install
}
else
{
Set-ItemProperty $RegStartUp -Name Install -Value c:\setup\install2.bat
}
}
StartUPInstall $ParamOption
Remove-ItemProperty $RegStartUp -Name Install = regkey를 지우는것
Set-ItemProperty $RegStartUp -Name Install -Value c:\setup\install2.bat = regkey 수정이나 추가할때 쓰인다.
startup 출처: http://blog.scorpiotek.com/2008/12/31/how-to-create-startup-items-on-server-core/
댓글 없음:
댓글 쓰기