question

osvbnet avatar image
0 Votes"
osvbnet asked JiachenLiMFST-9349 commented

System.Diagnostics.Process

Hello,
Need to have VC++ installed so I do check on Form_Load

Dim MyProcess As New System.Diagnostics.Process
MyProcess = New System.Diagnostics.Process()
MyProcess.StartInfo.FileName = blah
MyProcess.StartInfo.Arguments = "/quiet /norestart"
MyProcess.StartInfo.CreateNoWindow = True
MyProcess.StartInfo.UseShellExecute = False
MyProcess.StartInfo.RedirectStandardOutput = True
MyProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal / Hidden ?
MyProcess.Start()
MyProcess.WaitForExit()
If MyProcess.ExitCode <> 0 Then...
MyProcess.Close()

  1. Do I need to set: RedirectStandardOutput here?

  2. My problem is that it shows the MS VC++ installer evaluated window in the back of all windows, just blinking in the taskbar, can I force it show in the front?

Thanks.

dotnet-visual-basic
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JiachenLiMFST-9349 avatar image
0 Votes"
JiachenLiMFST-9349 answered JiachenLiMFST-9349 commented

Hi @osvbnet ,

  1. RedirectStandardOutput is not needed.

  2. It can be achieved by using the SetForegroundWindow function of win32 API.
    Best Regards.
    Jiachen Li


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.