Results 1 to 5 of 5
  1. #1
    nathanael890's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Posts
    158
    Reputation
    13
    Thanks
    46
    My Mood
    Bored

    Exclamation [Help]Starting a process[solved]

    Hi guys. I need some help in starting a process...

    I want to start a process with a parameter. but I didn't know what is the code to include...

    A person just said this to me but I can't understand it...
    Try concatenating all the SelectedPath, "/<process>", and the argument as one single string, and executing Shell with that string.

    I usually had file error when I included full path to the file. I usually had to separate the file name and the full folder path, and include them in separate arguments.
    what should be the vb Code for the parameter in order to launch the game???
    I like to create a program for it so I want the codes for it....

    I have tried this but it didn't work
    Shell(FolderBrowserDialog1.SelectedPath + "/<process> <parameter>")
    Last edited by nathanael890; 03-30-2010 at 04:32 PM.

  2. #2
    MJLover's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Neverland
    Posts
    759
    Reputation
    33
    Thanks
    110
    My Mood
    Cheerful
    Quote Originally Posted by nathanael890 View Post
    Hi guys. I need some help in starting a process...

    I want to start a process with a parameter. but I didn't know what is the code to include...

    A person just said this to me but I can't understand it...


    what should be the vb Code for the parameter in order to launch the game???
    I like to create a program for it so I want the codes for it....

    I have tried this but it didn't work
    Shell(FolderBrowserDialog1.SelectedPath + "/<process> <parameter>")
    Using nextgen1's code:

    Replace "yourfilename.exe" with your file name.
    And "/update" with the arguments you want to pass.

    [php]Dim newproc As System.Diagnostics.Process = Nothing
    Dim ProcSnfo As New ProcessStartInfo
    ProcSnfo.UseShellExecute = True
    ProcSnfo.FileName = "yourfilename.exe"
    ProcSnfo.Arguments = "/update"
    newproc = System.Diagnostics.Process.Start(ProcSnfo) [/php]

    I hope this will work.

  3. The Following 2 Users Say Thank You to MJLover For This Useful Post:

    nathanael890 (03-30-2010),NextGen1 (03-30-2010)

  4. #3
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Try

    fbd = Folderbrowserdialog1.SelectedPath
    Shell("""" & fbd & "\nameoffile.exe parameter""")

    or else

    Shell(fbd & "\nameoffile.exe parameter")



  5. The Following User Says Thank You to Blubb1337 For This Useful Post:

    nathanael890 (03-30-2010)

  6. #4
    nathanael890's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Posts
    158
    Reputation
    13
    Thanks
    46
    My Mood
    Bored
    Quote Originally Posted by MJLover View Post
    Using nextgen1's code:

    Replace "yourfilename.exe" with your file name.
    And "/update" with the arguments you want to pass.

    [php]Dim newproc As System.Diagnostics.Process = Nothing
    Dim ProcSnfo As New ProcessStartInfo
    ProcSnfo.UseShellExecute = True
    ProcSnfo.FileName = "yourfilename.exe"
    ProcSnfo.Arguments = "/update"
    newproc = System.Diagnostics.Process.Start(ProcSnfo) [/php]

    I hope this will work.
    Quote Originally Posted by Blubb1337 View Post
    Try

    fbd = Folderbrowserdialog1.SelectedPath
    Shell("""" & fbd & "\nameoffile.exe parameter""")

    or else

    Shell(fbd & "\nameoffile.exe parameter")
    Whoa.
    Both of you guys helped instantly ^^

    Thanks for your codes guys..
    I even searched this codes at google nor yahoo but I didn't found even one..

    My problem has been solved. ^^

  7. #5
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Quote Originally Posted by nathanael890 View Post
    Whoa.
    Both of you guys helped instantly ^^

    Thanks for your codes guys..
    I even searched this codes at google nor yahoo but I didn't found even one..

    My problem has been solved. ^^
    Cause we Rock

    /Solved


     


     


     



    The Most complete application MPGH will ever offer - 68%




  8. The Following User Says Thank You to NextGen1 For This Useful Post:

    nathanael890 (03-31-2010)

Similar Threads

  1. [Help]How to start another program?[Solved]
    By Web-Designer in forum Visual Basic Programming
    Replies: 11
    Last Post: 09-04-2010, 11:13 PM
  2. [HELP]Start Process/program in Resources
    By [Project Recon]Porhaxn in forum Visual Basic Programming
    Replies: 9
    Last Post: 06-20-2010, 10:10 AM
  3. [Help]Processes[Solved]
    By /b/oss in forum Visual Basic Programming
    Replies: 9
    Last Post: 06-16-2010, 11:56 PM
  4. [Help]Kill Process[Solved]
    By iDrEwX in forum Visual Basic Programming
    Replies: 12
    Last Post: 04-01-2010, 12:22 PM
  5. Start on Process Start?
    By PlSlYlClHlO in forum C++/C Programming
    Replies: 0
    Last Post: 06-04-2009, 05:27 PM