Power Shell2009. 11. 11. 11:12
##################################################################
# StartUpInstall - 이재동 - jdlee@innotive.com
#
# 부팅시 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/

Posted by 동동(이재동)