Function InputBox($sPrompt, Optional $sTitle, Optional $sDefault)
dim $PSCommand, $FH, $RC, $TempFile
If Not $sTitle
$sTitle = "Input Prompt"
EndIf
$TempFile = "%TEMP%\ps_inputbox.txt"
if exist($TempFile)
DEL $TempFile
endif
$PSCommand = 'powershell -Command "Add-Type -AssemblyName Microsoft.VisualBasic; '
$PSCommand = $PSCommand + "$input = [Microsoft.VisualBasic.Interaction]::InputBox('" + $sPrompt + "','" + $sTitle + "','" + $sDefault + "'); "
$PSCommand = $PSCommand + "$input | Out-File -FilePath '" + $TempFile + "' -Encoding ASCII"
;$PSCommand = "%COMSPEC% /c " + $PSCommand
SHELL $PSCommand
$fh = FreeFileHandle()
If Open($fh, $TempFile) = 0
$InputBox = ReadLine($fh)
$RC=Close($fh)
EndIf
EndFunction