一招儿使你的Windows 8/RT关机更加便捷(vbs)
发布时间:2012-12-26 16:26:30 作者:佚名
我要评论
近日有来自XDA开发者论坛的用户分享了一种更加简单的关机/重启方法,并表示该方法适合所有运行Windows 8/RT操作系统的PC及平板电脑
如果你是一位Windows 8用户,那么你会如何来关闭或重新启动你的设备呢?相信很多人都是按照先通过Win+C快捷键呼出Charms边栏,然后再依次点击“设定”和“电源”按钮的方法来实现关机操作。
不过,近日有来自XDA开发者论坛的用户分享了一种更加简单的关机/重启方法,并表示该方法适合所有运行Windows 8/RT操作系统的PC及平板电脑。
据该用户介绍,这种方法的基本思路是通过一段VBS脚本代码来为Windows 8的开始屏幕添加具备关机/重启功能的“磁贴”,从而实现更加直观快捷的操作。
具体来说,用户首先要新建一个任意名字的空白TXT文本(如Shutdown.txt),然后将下面图片中所显示的这些代码全部复制粘贴到文本当中,而后再将文本文件的文件扩展名由“.txt”修改为“.vbs”,使之成为一个VBS脚本文件。
注意,如果无法正常看到文件扩展名的话,那么请启用Windows 8系统“文件夹选项”中的“显示文件扩展名”功能。
最后,用户只需要双击运行刚才这个VBS脚本文件,就能够在Windows 8/RT系统就会在开始屏幕中创建具备关机/重启功能的“磁贴”。
另外,从目前XDA论坛的用户反馈来看,这种方法确实有效,所以欢迎大家也都动手体验试用。
然后将下面这些代码全部复制粘贴到文本当中,而后再将文本文件的文件扩展名由“.txt”修改为“.vbs”,使之成为一个VBS脚本文件,双击运行即可
set WshShell = WScript.CreateObject("WScript.Shell")
strStartMenu = WshShell.SpecialFolders("StartMenu")
set oShellLink = WshShell.CreateShortcut(strStartMenu & "\Shutdown.lnk")
oShellLink.TargetPath = "%systemroot%\System32\shutdown.exe"
oShellLink.Arguments = "-s -t 0"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "%systemroot%\System32\shell32.dll,27"
oShellLink.Description = "Shutdown Computer (Power Off)"
oShellLink.WorkingDirectory = "%systemroot%\System32\"
oShellLink.Save
Set oShellLink = Nothing
set oShellLink = WshShell.CreateShortcut(strStartMenu & "\Log Off.lnk")
oShellLink.TargetPath = "%systemroot%\System32\shutdown.exe"
oShellLink.Arguments = "-l"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "%systemroot%\System32\shell32.dll,44"
oShellLink.Description = "Log Off (Switch User)"
oShellLink.WorkingDirectory = "%systemroot%\System32\"
oShellLink.Save
Set oShellLink = Nothing
set oShellLink = WshShell.CreateShortcut(strStartMenu & "\Restart.lnk")
oShellLink.TargetPath = "%systemroot%\System32\shutdown.exe"
oShellLink.Arguments = "-r -t 0"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "%systemroot%\System32\shell32.dll,176"
oShellLink.Description = "Restart Computer (Reboot)"
oShellLink.WorkingDirectory = "%systemroot%\System32\"
oShellLink.Save
Set oShellLink = Nothing
Wscript.Echo "Shutdown, Restart and Log Off buttons have been created. You can now pin them to the Start Screen of your Windows 8 computer (if they are not already there)."
不过,近日有来自XDA开发者论坛的用户分享了一种更加简单的关机/重启方法,并表示该方法适合所有运行Windows 8/RT操作系统的PC及平板电脑。
据该用户介绍,这种方法的基本思路是通过一段VBS脚本代码来为Windows 8的开始屏幕添加具备关机/重启功能的“磁贴”,从而实现更加直观快捷的操作。
具体来说,用户首先要新建一个任意名字的空白TXT文本(如Shutdown.txt),然后将下面图片中所显示的这些代码全部复制粘贴到文本当中,而后再将文本文件的文件扩展名由“.txt”修改为“.vbs”,使之成为一个VBS脚本文件。
注意,如果无法正常看到文件扩展名的话,那么请启用Windows 8系统“文件夹选项”中的“显示文件扩展名”功能。
最后,用户只需要双击运行刚才这个VBS脚本文件,就能够在Windows 8/RT系统就会在开始屏幕中创建具备关机/重启功能的“磁贴”。
另外,从目前XDA论坛的用户反馈来看,这种方法确实有效,所以欢迎大家也都动手体验试用。
然后将下面这些代码全部复制粘贴到文本当中,而后再将文本文件的文件扩展名由“.txt”修改为“.vbs”,使之成为一个VBS脚本文件,双击运行即可
复制代码
代码如下:set WshShell = WScript.CreateObject("WScript.Shell")
strStartMenu = WshShell.SpecialFolders("StartMenu")
set oShellLink = WshShell.CreateShortcut(strStartMenu & "\Shutdown.lnk")
oShellLink.TargetPath = "%systemroot%\System32\shutdown.exe"
oShellLink.Arguments = "-s -t 0"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "%systemroot%\System32\shell32.dll,27"
oShellLink.Description = "Shutdown Computer (Power Off)"
oShellLink.WorkingDirectory = "%systemroot%\System32\"
oShellLink.Save
Set oShellLink = Nothing
set oShellLink = WshShell.CreateShortcut(strStartMenu & "\Log Off.lnk")
oShellLink.TargetPath = "%systemroot%\System32\shutdown.exe"
oShellLink.Arguments = "-l"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "%systemroot%\System32\shell32.dll,44"
oShellLink.Description = "Log Off (Switch User)"
oShellLink.WorkingDirectory = "%systemroot%\System32\"
oShellLink.Save
Set oShellLink = Nothing
set oShellLink = WshShell.CreateShortcut(strStartMenu & "\Restart.lnk")
oShellLink.TargetPath = "%systemroot%\System32\shutdown.exe"
oShellLink.Arguments = "-r -t 0"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "%systemroot%\System32\shell32.dll,176"
oShellLink.Description = "Restart Computer (Reboot)"
oShellLink.WorkingDirectory = "%systemroot%\System32\"
oShellLink.Save
Set oShellLink = Nothing
Wscript.Echo "Shutdown, Restart and Log Off buttons have been created. You can now pin them to the Start Screen of your Windows 8 computer (if they are not already there)."
相关文章

windows索引器可以关闭么? Win7禁用索引器回退的方法
如果你用的是Win7系统,那么索引服务会占用一些系统资源哦,如果你觉得不需要这个功能,就可以把它关掉,这样就不会影响到你的设备使用体验啦2025-04-09
Win7如何禁用刻录光盘功能? 关闭Win7系统中CD刻录功能的方法
在公司局域网中,有时候处于商业机密保护的需要,我们需要禁止光驱刻录功能而只保留光驱播放功能,那么我们该如何禁用win7系统的光驱刻录功能、禁止光驱刻录DVD呢?详细请2025-03-25
电脑打字选字框消失怎么办? win7系统解决打字没有选字框的方法
当你在电脑上打字时,发现选字框消失了,这可能是由于系统设置或软件问题导致的,下面我们就来看看详细解决办法2025-03-24
Win7怎么调DPI? Win7系统DPI缩放功能的设置方法
相信很多用户在使用Win7系统时,为了方便自己使用,都会进行一些设置,其中肯定有DPI缩放功能,它能够按照用户自己的习惯去显示最佳的效果,但有部分用户想将其关闭,具体2025-02-28
在Win7电脑操作中,用户因操作需求想关闭实时保护功能,但不清楚在哪里才能成功关闭?详细请看下文设置方法2025-02-24
win7怎么设置软件不联网使用? Win7电脑给某个软件断网的技巧
最近有使用Win7系统的用户想要设置某个软件不要联网,该怎么单独设置不让某个程序联网呢?下面我们就来看看详细教程2025-02-18
最近有使用Win7系统的用户想要设置系统中的环境变量,让程序运行更顺畅,该怎么设置呢?详细请看下文介绍2025-02-18
如何关闭自动压缩图片功能? Win7禁用图片自动压缩功能的技巧
很多用户可能会遇到一个问题:为什么上传或保存的图片质量变差了?这通常是因为系统或应用默认启用了自动压缩图片功能,今天,我们就来详细介绍一下如何关闭这个功能2025-02-05
不同的用户对于电脑字体大小的要求可能不一样,比如近视的用户需要将电脑字体设置较大一点,或者是部分老年群体需要放大电脑字体,那么电脑字体大小怎么设置、调整成适合自2025-01-20
win7切换窗口效果怎么设置? win7系统实现窗口切换的教程
但最近有不少用户在使用Win7系统时发现窗口切换效果速度非常慢的情况,因此想设置更改,却不清楚具体如何操作?详细请看下文介绍2024-12-30



最新评论