11-26-2008
Downloads: 574
File size: 209 B
Views: 11,818
Embed
 |
Display InputBox for user input |
- [void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')
-
- $name = [Microsoft.VisualBasic.Interaction]::InputBox("Enter your name", "Name", "$env:username")
-
- "Your name is $name"
illustrates how to use VisualBasic methods like InputBox to display a freetext dialog for users to enter text. It also demos how to have the dialog display a default text.