Showing posts with label Script. Show all posts
Showing posts with label Script. Show all posts

Tuesday, December 1, 2009

วิธี reset ค่า Compact Check Count ใน Outlook Express

script เอาไว้สำหรับ reset ค่า Compact Check Count เพื่อไม่ให้ Outlook Express ถามให้ Compact ตอนที่ออกจากโปรแกรม

Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set StdOut = WScript.StdOut

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")

strKeyPath = "Identities"

oReg.EnumKey HKEY_CURRENT_USER, strKeyPath, arrKeys

For Each strKey In arrKeys
  strKeyPath = "Identities\" & strKey & "\Software\Microsoft\Outlook Express\5.0"
  oReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath, "Compact Check Count", 0
Next