Open the start menu using Powershell
Am currently working on a business process automation software and literally user actions are simulated by robots. I need to pass some information to the start menu of my windows 7 and i was wondering if the windows start menu could be opened using a powershell script? As the information to open a powershell can be understood by the robots. Please any suggestions would be nice.
Yes, it is possible using a little VB.
Copy this code into Notepad, and save as startmenu.vbs
. [Make sure it doesn't get saved as startmenu.vbs.txt]
set wShell=wscript.createobject("wscript.shell")
wShell.sendkeys "^{ESC}"
Set WshShell = Nothing
Then, you can just run it with cscript C:\somefilepath\startmenu.vbs
.
(Obviously, you'll have to specify the path where you save it to)
Or, translated to a Powershell solution:
$wShell = New-Object -ComObject "wscript.shell"
$wShell.SendKeys("^{ESC}")
Which can be further shortened to:
(New-Object -ComObject "wscript.shell").SendKeys("^{ESC}")