달력

1

« 2015/1 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

Const DOMAIN_PROFILE = 1

Const PRIVATE_PROFILE = 2

Const PUBLIC_PROFILE = 4


Set fwPolicy2 = CreateObject("HNetCfg.FwPolicy2")


CurrentProfile = fwPolicy2.CurrentProfileTypes

Select Case CurrentProfile

  Case DOMAIN_PROFILE

    WScript.Echo "현재 프로필: 도메인"

  Case PRIVATE_PROFILE

    WScript.Echo "현재 프로필: 개인"

  Case PUBLIC_PROFILE

    WScript.Echo "현재 프로필: 공용"

End Select


WScript.Echo "==================="


If fwPolicy2.FirewallEnabled(DOMAIN_PROFILE) = TRUE Then

  WScript.Echo "도메인 프로필: 사용"

Else

  WScript.Echo "도메인 프로필: 사용 안 함"

End If


If fwPolicy2.FirewallEnabled(PRIVATE_PROFILE) = TRUE Then

  WScript.Echo "개인 프로필: 사용"

Else

  WScript.Echo "개인 프로필: 사용 안 함"

End If


If fwPolicy2.FirewallEnabled(PUBLIC_PROFILE) = TRUE Then

  WScript.Echo "공용 프로필: 사용"

Else

  WScript.Echo "공용 프로필: 사용 안 함"

End If


Set fwPolicy2 = NOTHING




:
Posted by 커널64
2015. 1. 8. 11:07

VBS - Windows 업데이트 설정 쿼리 Etc.2015. 1. 8. 11:07

Set objAutoUpdate = CreateObject("Microsoft.Update.AutoUpdate")

Set objSettings = objAutoUpdate.Settings


WUSetting = objSettings.NotificationLevel


Set objSettings = NOTHING

Set objAutoUpdate = NOTHING


Select Case WUSetting

  Case 1

    strSetting = "업데이트를 확인하지 않음"

    strState = "GOOD"

  Case 2

    strSetting = "업데이트를 확인하지만 다운로드 및 설치 여부는 직접 선택"

    strState = "GOOD"

  Case 3

    strSetting = "업데이트를 다운로드하지만 설치 여부는 직접 선택"

    strState = "GOOD"

  Case 4

    strSetting = "업데이트 자동 설치"

    strState = "BAD"

End Select



WScript.Echo strSetting

WScript.Echo strState





:
Posted by 커널64