This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Show the "Run" dialog. | |
(New-Object -ComObject "Shell.Application").FileRun() | |
Start-Sleep -Milliseconds 50 | |
# Focus at the dialog. | |
# Doesn't seem to work, I've got no VisualBasic installed. | |
#[Microsoft.VisualBasic.Interaction]::AppActivate(“Run”) | |
# Type in the command. | |
[System.Windows.Forms.SendKeys]::SendWait("hehe") |