Добавление плитки выключения и перезагрузки для стартового экрана на ваш Windows 8 или Windows, RT For most of us on Windows 8, we simply hit Win+C to bring up the Charms bar, hit Settings, then power, then we shut down our PC. But for those who are on a tablet device running Windows 8 or Windows RT, perhaps there's an easier way to shutdown or restart. Well, there is. If you want to create a shutdown and reboot tile in your Start Screen for easy access to these useful system commants, read along. Simply copy the following code into a new txt file and rename it to whatever you like, just add the .vbs to the file extension. For example: shutdown.vbs. Once this is done, simply double click the script and it will create the tiles for you. If you are unable to create a .vbs document, make sure you have "show file names extensions" enabled in Folder Options within Windows 8. Код: set WshShell = WScript.CreateObject("WScript.Shell") strStartMenu = WshShell.SpecialFolders("StartMenu") set oShellLink = WshShell.CreateShortcut(strStartMenu & "Shutdown.lnk") oShellLink.TargetPath = "%systemroot%System32shutdown.exe" oShellLink.Arguments = "-s -t 0" oShellLink.WindowStyle = 1 oShellLink.IconLocation = "%systemroot%System32shell32.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%System32shutdown.exe" oShellLink.Arguments = "-l" oShellLink.WindowStyle = 1 oShellLink.IconLocation = "%systemroot%System32shell32.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%System32shutdown.exe" oShellLink.Arguments = "-r -t 0" oShellLink.WindowStyle = 1 oShellLink.IconLocation = "%systemroot%System32shell32.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)."
[quote author="BigStone"]Добавление плитки выключения и перезагрузки для стартового экрана на ваш Windows 8 или Windows, RT For most of us on Windows 8, we simply hit Win+C to bring up the Charms bar, hit Settings, then power, then we shut down our PC. But for those who are on a tablet device running Windows 8 or Windows RT, perhaps there's an easier way to shutdown or restart. Well, there is. If you want to create a shutdown and reboot tile in your Start Screen for easy access to these useful system commants, read along. Simply copy the following code into a new txt file and rename it to whatever you like, just add the .vbs to the file extension. For example: shutdown.vbs. Once this is done, simply double click the script and it will create the tiles for you. If you are unable to create a .vbs document, make sure you have "show file names extensions" enabled in Folder Options within Windows 8. Код: set WshShell = WScript.CreateObject("WScript.Shell") strStartMenu = WshShell.SpecialFolders("StartMenu") set oShellLink = WshShell.CreateShortcut(strStartMenu & "Shutdown.lnk") oShellLink.TargetPath = "%systemroot%System32shutdown.exe" oShellLink.Arguments = "-s -t 0" oShellLink.WindowStyle = 1 oShellLink.IconLocation = "%systemroot%System32shell32.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%System32shutdown.exe" oShellLink.Arguments = "-l" oShellLink.WindowStyle = 1 oShellLink.IconLocation = "%systemroot%System32shell32.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%System32shutdown.exe" oShellLink.Arguments = "-r -t 0" oShellLink.WindowStyle = 1 oShellLink.IconLocation = "%systemroot%System32shell32.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)." [/quote] those who are on a tablet device running Windows 8 or Windows RT can just swipe in from the right edge of the screen to bring up Charms.
Многие, для выключения компьютера вызывают сочетанием клавиш Win+C чудо панель. Нажимают чудо кнопку параметры и выбирают выключение(завершение работы). Для планшетов это может быть не совсем удобно. Нужна плитка. Раз нужна, значит нужна, создаём плитку. Нам потребуется скопировать нижеприведённый код в файл с именем например shutdown.vbs. После создания файла запустите его*. Код: set WshShell = WScript.CreateObject("WScript.Shell") strStartMenu = WshShell.SpecialFolders("StartMenu") set oShellLink = WshShell.CreateShortcut(strStartMenu & "Shutdown.lnk") oShellLink.TargetPath = "%systemroot%System32shutdown.exe" oShellLink.Arguments = "-s -t 0" oShellLink.WindowStyle = 1 oShellLink.IconLocation = "%systemroot%System32shell32.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%System32shutdown.exe" oShellLink.Arguments = "-l" oShellLink.WindowStyle = 1 oShellLink.IconLocation = "%systemroot%System32shell32.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%System32shutdown.exe" oShellLink.Arguments = "-r -t 0" oShellLink.WindowStyle = 1 oShellLink.IconLocation = "%systemroot%System32shell32.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)." Получаем вот такое сообщение: И можем пользоваться нашими удобными кнопками. * Не забудьте настроить проводник для отображения расширений файлов.