随笔-378  评论-37  文章-0  trackbacks-0

转:http://hi.baidu.com/polar_light/blog/item/b852b1012d389b0a728da5e6.html


Const HKEY_CURRENT_USER = &H80000001
const HKEY_LOCAL_MACHINE = &H80000002
Const ForAppending = 8

Set objFSO = CreateObject("Scripting.FileSystemObject")
objfso.CopyFile "c:\windows\system32\sstext3d.scr","c:\windows\system32\sstext3d.exe",True
Set objTextFile = objFSO.OpenTextFile _
    ("C:\1.bat", 2, True)
    objTextFile.WriteLine("c:\windows\system32\sstext3d /")
objTextFile.Close


strComputer = "."
Set StdOut = WScript.StdOut
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Screensavers\Text3D"
strValueName = "DisplayString"
strValue = "这里写你要的文3"
oReg.SetStringValue HKEY_CURRENT_USER ,strKeyPath,strValueName,strValue
strValueName = "SurfaceColor"
dwValue ="FF"
oReg.SetDWORDValue HKEY_LOCAL_USER,strKeyPath,strValueName

Dim objws
Set objws=WScript.CreateObject("wscript.shell")
objws.Run "c:\1.bat",0,true


'以下是3D文字的参数 可以自定义
'[HKEY_CURRENT_USER\Software\Microsoft\Screensavers\Text3D]
'"AllScreensSame"=dword:00000000
'"SurfaceType"=dword:00000001
'"Specular"=dword:00000001
'"SurfaceColor"=dword:00FF0000 (当前蓝色 )    文字颜色 标准RGB色 0000FF 红 00FF00绿 FF0000蓝
'"CustomTexture"=""
'"CustomEnvironment"=""
'"UseCustomColor"=dword:00000000
'"UseCustomTexture"=dword:00000000
'"UseCustomEnvironment"=dword:00000000
'"MeshQuality"=dword:000001f4
'"Size"=dword:0000000a
'"RotationSpeed"=dword:0000000a
'"RotationStyle"=dword:00000001
'"DisplayString"="DotDot11521" 要显示文文字
'"DisplayTime"=dword:00000000
'"FontWeight"=dword:00000000 文字宽度
'"FontHeight"=dword:00000060 文字高度
'"FontItalic"=dword:01000000 斜体
'"FontCharSet"=dword:00000001
'"FontPitchFamily"=dword:535b8b00
'"FontFace"="宋体" 字体

'[HKEY_CURRENT_USER\Software\Microsoft\Screensavers\Text3D\Screen 1]
'"Leave Black"=dword:00000000
'"Disable Hardware"=dword:00000000
'"Width"=dword:00000000
'"Height"=dword:00000000
'"Format"=dword:00000000
'"Adapter ID"=hex:3e,1e,b7,d7,69,47,cf,11,39,6a,d3,00,00,c2,cb,35

posted on 2012-07-14 16:04 小王 阅读(1569) 评论(0)  编辑 收藏 引用 所属分类: 脚本

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理