在Win8开始屏幕添加“关机、重启、注销”磁贴的VBS脚本(图)

注:本教程同样适用于Win8.1、Win10系统

先来看看Microsoft酋长的Windows8开始屏幕的“关机、重启、注销”磁贴吧!

在Win8开始屏幕添加“关机、重启、注销”磁贴的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)."

然后把该文本文档重命名为“Shutdown.vbs”(如果你的Win8系统默认不显示文件扩展名,需要先设置显示扩展名,手动显示扩展名的设置方法使用Hifito显示扩展名)。

然后双击运行“Shutdown.vbs”脚本文件,弹出的对话框,点击“确定”,然后再回到Win8开始屏幕,你会发现已经显示“关机、重启、注销”磁贴了。

如果你懒得自制脚本文件,也可以下载Microsoft酋长制作好的脚本文件。

云盘下载 | 百度网盘(解压密码:52windows8.com)

Win10专业网,教你玩转Win10系统!

相关文章

此条目发表在Win8使用技巧分类目录,贴了, 标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用*标注