BP Forums
Running an embeded EXE .NET 2013 - Printable Version

+- BP Forums (https://bpforums.info)
+-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55)
+--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56)
+---- Forum: VB.NET (Visual Basic 2010/2008) (https://bpforums.info/forumdisplay.php?fid=8)
+----- Forum: Programming Help (https://bpforums.info/forumdisplay.php?fid=9)
+----- Thread: Running an embeded EXE .NET 2013 (/showthread.php?tid=836)



Running an embeded EXE .NET 2013 - Worf - 10-14-2014

Hi.

I'm currently working on a new project for working with .PK3 - .DMD & .MD2 files.

Now, I have an EXE (cv.exe) that I would like to embed into my program and execute through the routine below.

I've tried different methods found on the internet without any luck.

Code:
' This routine runs MD2Tool with the selected tasks. (Convert)    
  
Private Sub RunMD2tool(ByVal path As String, ByVal file As String, ByVal tasks As String)    
  
Dim p As New Process()    
  
Dim infs() As String = {"""" & path & "\" & (file) & """" & tasks}    
  
With p.StartInfo    
For f = 0 To infs.Count - 1    
.Arguments = infs(f)    
.FileName = "cv.exe"    
  
' Hide the window ?    
p.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden    
p.Start()    
  
Do While Not p.HasExited    
Application.DoEvents()    
Loop    
Next    
End With    
  
MsgBox("Convertion complete.")    
  
SinglePath.Text = Nothing    
Label7.Text = Nothing    
  
End Sub

Many thanks for your help.

Regards

Tony


Re: Running an embeded EXE .NET 2013 - brandonio21 - 10-19-2014

I remember quite some time ago, I was looking for a solution to this exact problem. Unfortunately, I was not able to find anything.

Sorry for not being able to offer any advice. If you find a solution, be sure to let us know!