Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Copyright (c) 2016
- ;
- ;Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
- ;documentation files (the "Software"), to deal in the Software without restriction, including without limitation
- ;the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
- ;to permit persons to whom the Software is furnished to do so, subject to the following conditions:
- ;
- ;The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
- ;
- ;THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
- ;TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- ;THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- ;CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- ;DEALINGS IN THE SOFTWARE.
- #SingleInstance force
- SetFormat, Floatfast, 0.2
- isXP := false
- isW8 := false
- isW10 := false
- winVer := A_OSVersion
- w10Pos := InStr(winVer,10.)
- if winVer = WIN_XP
- isXP := true
- else if (winVer = "WIN_8" or winVer = "WIN_8.1")
- isW8 := true
- else if (w10Pos > 0)
- isW10 := true
- Menu, ShutdownMenu, Add, Sign Out, SignOut
- Menu, ShutdownMenu, Add, Sleep, MenuSleep
- Menu, ShutdownMenu, Add, Shutdown, MenuShutdown
- Menu, ShutdownMenu, Add, Restart, MenuRestart
- Menu, StandardMenu, Add, Programs and Features, ProgramsAndFeatures
- Menu, StandardMenu, Add, Power Options, PowerOptions
- Menu, StandardMenu, Add, Event Viewer, EventViewer
- Menu, StandardMenu, Add, System, System
- Menu, StandardMenu, Add, Device Manager, DeviceManager
- Menu, StandardMenu, Add, Network Connections, NetworkConnections
- Menu, StandardMenu, Add, Disk Management, DiskManagement
- Menu, StandardMenu, Add, Computer Management, ComputerManagement
- Menu, StandardMenu, Add, Command Prompt, CommandPrompt
- Menu, StandardMenu, Add, Command Prompt (Admin), CommandPromptAdmin
- Menu, StandardMenu, Add,
- Menu, StandardMenu, Add, Task Manager, TaskManager
- Menu, StandardMenu, Add, Control Panel, ControlPanel
- Menu, StandardMenu, Add, File Explorer, FileExplorer
- Menu, StandardMenu, Add, Search, Search
- Menu, StandardMenu, Add, Run, MenuRun
- Menu, StandardMenu, Add,
- Menu, StandardMenu, Add, Shut down or sign out, :ShutdownMenu
- Menu, StandardMenu, Add, Desktop, Desktop
- #x::
- ShowMenu()
- return
- ShowMenu()
- {
- Menu, StandardMenu, Show,
- }
- NotWorking()
- {
- ;not functioning right now
- TrayTip,, This function doesn't work currently, 10
- }
- RunAsAdmin(command, params:="", wait := false)
- {
- DllCall("Wow64DisableWow64FsRedirection", "uint*", OldValue)
- if wait
- RunWait, *runas %command% %params%
- else
- Run, *runas %command% %params%
- DllCall("Wow64RevertWow64FsRedirection", "uint", OldValue)
- return
- }
- Run(params, wait := false)
- {
- toRun = %comspec% /c "%params%"
- if wait
- RunWait, %toRun%
- else
- Run, %toRun%
- return
- }
- Restart(timewait)
- {
- Run, shutdown /r /t %timewait%
- }
- ProgramsAndFeatures:
- Run, appwiz.cpl
- return
- PowerOptions:
- Run, powercfg.cpl
- return
- EventViewer:
- Run, eventvwr.exe
- return
- System:
- if isXP = true
- Run, control sysdm.cpl
- else
- Run, control /name Microsoft.System
- return
- DeviceManager:
- Run, devmgmt.msc
- return
- NetworkConnections:
- Run, control netconnections
- return
- DiskManagement:
- Run, diskmgmt.msc
- return
- ComputerManagement:
- Run, compmgmt.msc
- return
- CommandPrompt:
- Run, %windir%\system32\cmd.exe
- return
- CommandPromptAdmin:
- RunAsAdmin(comspec)
- return
- TaskManager:
- Run, taskmgr.exe
- return
- ControlPanel:
- Run, control
- return
- FileExplorer:
- Run, explorer.exe
- return
- Search:
- ;sketchy way to search
- Run, cmd /c echo CreateObject("Shell.Application").FindFiles >%temp%\myff.vbs & cscript.exe //Nologo %temp%\myff.vbs & del %temp%\mff.vbs
- return
- MenuRun:
- Run, explorer.exe Shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}
- return
- SignOut:
- Run, shutdown /l /t 0
- return
- MenuSleep:
- NotWorking()
- return
- MenuShutdown:
- Run, shutdown /s /t 0
- return
- MenuRestart:
- Run, shutdown /r /t 0
- return
- Desktop:
- WinMinimizeAll
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement