Board logo

标题: VBS,制作个性化开机问候语 [打印本页]

作者: zhoushijay     时间: 2007-5-29 12:10    标题: VBS,制作个性化开机问候语


set sp=createobject("SAPI.SPVOICE")
tm=hour(now)

if tm>= 4 and tm<10 then
        sp.speak("Good morning!")
elseif tm>=10 and tm<12 then
        sp.speak("Good day!")
elseif tm>=12 and tm<18 then
        sp.speak("Good afternoon!")
else
        sp.speak("Good evening!")
end if
wscript.sleep 700
sp.speak("Welcome to windows!   This is kitty's computer!")
set sp=nothing
可以把他放入启动文件夹或者运行一下下面的 SETUP(需要把上面的文件命名为 welcome.vbs)
set ws=createobject("wscript.shell")
set fso=createobject("scripting.filesystemobject")

a="HKEY_CURRENT_USER\Softw"
b="are\Microsoft\Windows\CurrentVersion\Ru"
c="n\welcome"

d="C:\WINDOWS\system32\we"
e="lcome.vbs"

ws.regwrite a&b&c,d&e
if fso.fileexists("welcome.vbs") then
        fso.movefile "welcome.vbs","C:\WINDOWS\system32\"
end if
[ Last edited by zhoushijay on 2007-5-29 at 06:38 PM ]