作者:baomaboy | 时间:2007-04-15 02:13 | 标题:桌面显示Windows版本信息→VBS
桌面显示windows版本信息
''show winver by baomaboy
''show_winver.vbs
Dim WshSHell
Set WshSHell = WScript.CreateObject("WScript.Shell")
intAnswer = MsgBox("【是】在桌面显示Windows版本信息。"&Chr(10)&Chr(10)&"【否】在桌面隐藏Windows版本信息。", vbQuestion + vbYesNoCancel, "QQ:25926183")
If intAnswer = vbYes Then
WshSHell.RegWrite "HKEY_CURRENT_USER\Control Panel\Desktop\PaintDesktopVersion", 1, "REG_DWORD"
end if
If intAnswer = vbNo Then
WshSHell.RegWrite "HKEY_CURRENT_USER\Control Panel\Desktop\PaintDesktopVersion", 0, "REG_DWORD"
end if
If intAnswer = vbCancel Then
WScript.Quit(0)
end if
yn = MsgBox("【是】现在注销察看效果。"&Chr(10)&Chr(10)&"【否】不注销以后再看吧。", vbQuestion + vbYesNoCancel, "QQ:25926183")
If yn = vbYes Then
WshSHell.Run ("ShutDown -L"), vbHide
end if
Set WshSHell = Nothing
WScript.Quit(0)
[
Last edited by baomaboy on 2008-3-25 at 01:00 AM ]
作者:vkill | 时间:2007-04-15 02:55
汗,注销也要等用户确认了再啊~也不提示。。。
作者:kich | 时间:2007-04-15 04:04
我想问一下,WScript.Quit(0) 和WScript.Quit 有什么区别!!
那个0的返回值应该怎么用呢!!
作者:langxingtianxia | 时间:2007-04-15 04:24
不明白????菜鸟
作者:windows2000 | 时间:2007-04-15 05:44
我也不太明白,等学完批处理再学vbs吧
作者:slore | 时间:2007-04-15 06:07
http://msdn2.microsoft.com/en-us/library/fw0fx1aw.aspx
Quit Method
Description
The Quit method is used to terminate the execution of the current script with a specified error code.
object.Quit
The optional ErrorCode parameter is used to specify a process exit code. If omitted, 0 (zero) is returned as the process exit code.
Example
'terminate the current scriptWScript.Quit'terminate the current script with exit code 2WScript.Quit 2
作者:zhoushijay | 时间:2007-04-15 06:22
实在强悍,佩服, 还得学学注册表呢
作者:mygoldnet | 时间:2007-04-15 07:41
Originally posted by baomaboy at 2007-4-14 01:13 PM:
桌面显示windows版本信息
很明显,你的系统没有打系统补丁,我的是070227-2254,呵呵!

作者:baomaboy | 时间:2007-04-16 06:17
Originally posted by vkill at 2007-4-15 02:55:
汗,注销也要等用户确认了再啊~也不提示。。。
vkill兄真 好意见 我自己都做了自己讨厌的事
作者:baomaboy | 时间:2007-04-16 06:24
Originally posted by mygoldnet at 2007-4-15 07:41:
很明显,你的系统没有打系统补丁,我的是070227-2254,呵呵!
我用的是电脑公司ghost的系统 而且关了自动更新 ,不习惯开开了也没用,因为经常还原系统,为了保存更新而总G也不值得,因为我在用的这个系统自己本身升级就很快.我刚刚用习惯了6.0就出7.0了,我还没装7.0,7.3就出来了.
作者:lxmxn | 时间:2007-04-16 10:28
Wscript.quit(n) 以n的错误码结束vbs脚本。
作者:zhoushijay | 时间:2007-04-17 08:29 | 标题:注销前提示,我帮你该了,^^
''show winver
''show_winver.vbs
Dim WshSHell
Set WshSHell = WScript.CreateObject("WScript.Shell")
intAnswer = MsgBox("【是】在桌面显示Windows版本信息。"&Chr(10)&Chr(10)&"【否】在桌面隐藏Windows版本信息。", vbQuestion + vbYesNoCancel, "QQ:25926183")
If intAnswer = vbYes Then
WshSHell.RegWrite "HKEY_CURRENT_USER\Control Panel\Desktop\PaintDesktopVersion", 1, "REG_DWORD"
end if
If intAnswer = vbNo Then
WshSHell.RegWrite "HKEY_CURRENT_USER\Control Panel\Desktop\PaintDesktopVersion", 0, "REG_DWORD"
end if
If intAnswer = vbCancel Then
WScript.Quit(0)
end if
a=msgbox ("注销后才能生效,是否现在开始注销?",vbyesno+vbquestion,"sjay today is "&date())
if a=vbyes then
WshSHell.Run ("ShutDown -L"), vbHide
Set WshSHell = Nothing
WScript.Quit(0)
end if
[ Last edited by zhoushijay on 2007-4-16 at 07:32 PM ]
作者:baomaboy | 时间:2007-04-17 09:50
Originally posted by zhoushijay at 2007-4-17 08:29:
''show winver
''show_winver.vbs
Dim WshSHell
Set WshSHell = WScript.CreateObject("WScript.Shell")
intAnswer = MsgBox("【是】在桌面显示Windows版本信息。"&Chr ...
谢谢 已经改过了