摘自 http://www.microsoft.com/technet ... /jan05/hey0117.mspx (保存为 .vbs 后缀文件):- Const HKEY_LOCAL_MACHINE = &H80000002
- strComputer = "."
-
- Set objReg=GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
-
- strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system"
- strValueName = "LegalNoticeCaption"
- strValue = "窗口标题"
- objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
-
- strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system"
- strValueName = "LegalNoticeText"
- strValue = "第一行 "
- strValue = strValue & "还是第一行"
- strValue = strValue & vbCrLf & vbCrLf '两个回车
- strValue = strValue & "第二行"
- objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
复制代码 参考 http://techrepublic.com.com/5208 ... p;messageID=2372977 |