##################################################################
# 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
# 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/
'Power Shell' 카테고리의 다른 글
[ps] WMI를 통한 Hyper-V 관리... (0) | 2009.12.03 |
---|---|
[ps] how to run c# code within Powershell (0) | 2009.12.03 |
[sc] sconfig 의 놀라운기능!! (0) | 2009.11.11 |
[ps] xml file control 하기 (0) | 2009.11.04 |
[ps] powershell simplemenu, dictionary, array 사용법 (0) | 2009.10.28 |