VB.NET read standard output -
from application need run command , parse output. can no problem don't want command displayed. hoped windowstyle = processwindowstyle.hidden
work doesn't. take sample code below example. works fine command window still visibly opens , closes , need never show ugly face. how can fix this?
dim myprocess new process dim lines string = "" myprocess .startinfo.filename = "c:\windows\system32\cmd.exe" .startinfo.arguments = "/c ipconfig" .startinfo.windowstyle = processwindowstyle.hidden .startinfo.redirectstandardoutput = true .startinfo.useshellexecute = false .start() end lines = myprocess.standardoutput.readtoend msgbox(lines)
try setting createnowindow
true
too.
if trying achieve find ip address(es) of local machine, there more direct ways of doing it.
Comments
Post a Comment