Avatar of Cristi_E
Cristi_E
Flag for Romania asked on

System.Diagnostics.Process.Start() problem

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'"
Smartphone ProgrammingVisual Basic.NETWindows OS

Avatar of undefined
Last Comment
Mikal613

8/22/2022 - Mon
Mikal613

Cristi_E

ASKER
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 .
ASKER CERTIFIED SOLUTION
Mikal613

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Cristi_E

ASKER
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.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Mikal613

what type of device are you targeting?  Pocket PC 200X??
Mikal613

        System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo();
            psi.FileName = "/Windows/explore.txt";
            System.Diagnostics.Process.Start(psi);
Cristi_E

ASKER
Project type:  Visual Basic > Smart Device >  Windows Mobile 5.0 Pocket PC > Device Application.

Should i change the type of project to: Visual Basic > Smart Device > Pocket PC 2003 ?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Mikal613

no no 5.0 is perfect
Cristi_E

ASKER
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

Thanks!
Mikal613

np
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck