Results 1 to 8 of 8

Thread: Launching Apps...

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2006
    Posts
    61

    Launching Apps...

    you knwo for for example the launch code in a shortcut on your harddrive.. you can do something like ["c://test.exe" +fullscreen1]?... is there a way i could you ProcessStart to do this?...

  2. #2
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,713

    Re: Launching Apps...

    Yes, there is an Arguments property in the Process.ProcessStartInfo.Arguments
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    105,454

    Re: Launching Apps...

    If all you want to specify is commandline arguments then you don't need a ProcessStartInfo object, although you can use one if you want. The simplest way is this:
    VB Code:
    1. Process.Start("executable path", "commandline arguments")
    If you want to specify things like verbs, working directory, etc. then you'll need to use a ProcessStartInfo object.

  4. #4

    Thread Starter
    Member
    Join Date
    Feb 2006
    Posts
    61

    Re: Launching Apps...

    great... it works... but no one the console opens up and shows the games loading status... it says unable to load default config at "c://pathTOmyEXEinsteadOFgame/default.cfg

    it says its an invalid search path... do you knwo any argument i could maybe try using to change the search directory like

    +search_directory "c://pathTOgameINSTEADofEXE"

  5. #5
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    105,454

    Re: Launching Apps...

    Everyone who tries to start a game like this has the same issue. Everyone else has solved their problem by using a ProcessStartInfo object and setting the WorkingDirectory to the folder that contains the games executable, which is what most desktop shortcuts do and it seems most games expect.
    VB Code:
    1. Dim psi As New ProcessStartInfo("executable path", "commandline arguments")
    2.  
    3. psi.WorkingDirectory = IO.Path.GetDirectoryName(psi.FileName)
    4. Process.Start(psi)

  6. #6
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,713

    Re: Launching Apps...

    Quote Originally Posted by jmcilhinney
    If all you want to specify is commandline arguments then you don't need a ProcessStartInfo object, although you can use one if you want ... Everyone else has solved their problem by using a ProcessStartInfo object
    Do I hear an echo
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    105,454

    Re: Launching Apps...

    There was no mention of a working directory to begin with. Anyway, I plead stupidity your honour.

  8. #8
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,713

    Re: Launching Apps...



    I like the way you specify the wd ...

    VB Code:
    1. IO.Path.GetDirectoryName(psi.FileName)
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width