Hello,
I'm developing a Windows Mobile application in VB.Net 2005. I need to run the "System.Diagnostics.Process.Start() " to launch another application on the Pocket-PC.
How should i pass the parameters to launch the respective application?
I have a string variable (strPath) that contains the full path to the application.
If i try something like "System.Diagnostics.Process.Start(strPath)" i am noticed that the "Value of type 'String' cannot be converted to 'System.Diagnostics.ProcessStartInfo'"
I would like to use "System.Diagnostics.Process.Start() " in this case.... not "CreateProcess and C#".
I just need to know how to pass the parameters in order to launch the application that i want to .
Dim startInfo As New ProcessStartInfo("YourApp") ... i get the following error:
Error 1 Overload resolution failed because no accessible 'New' accepts this number of arguments.
Finally, based on what you send to me, i managed to fulfill with this code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim appPath As String = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
Dim startInfo As New ProcessStartInfo
'
startInfo.FileName = appPath & "\SampleApp.cab"
System.Diagnostics.Process.Start(startInfo)
End Sub