CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2011
    Posts
    0

    Using VB Express to run an exe or bat file problem.

    What I am trying to do is make a front-end application for the mugen 2d fighting game engine that uses command line arguments.

    Right now I am just trying to make a button that will run the mugen.exe file.

    So first I tried this;

    System.Diagnostics.Process.Start("C:\Users\Mary\Downloads\mugen100\mugen1\mugen.exe")

    Mugen gives me an error that says it can't load data/Mugen.cfg. Data is a folder in the mugen1 directory. If I run mugen by clicking it or even with the command line it runs fine.

    So I tried making a bat file for it and run that instead.

    System.Diagnostics.Process.Start("C:\Users\Mary\Downloads\mugen100\mugen1\mugenbat.bat")

    If I click on the bat file, no problem at all, when I run this button I get

    'This appilaction has fail to start because side-by-side configuration is incorrect. Please see the application event log for more information" In the prompt.

    Application even log reports back for sidebyside

    "Activation context generation failed for "C:\Windows\system32\mugen.exe". Dependent Assembly Elecbyte.MUGEN.libs,processorArchitecture="x86",type="win32",version="1.0.0.0" could not be found. Please use sxstrace.exe for detailed diagnosis."

    I am a noob, but "C:\Windows\system32\mugen.exe". doesn't look like the right thing to me, but hey maybe I am wrong, either way i do not know how to fix it.

    Elecbyte.MUGEN.libs is in a folder inside of the mugen1 directory.

    Again, mugen works and so does the bat as long as I don't run them through VB Express.

    If you don't know what mugen is and just in case it is important, it can be downloaded from here,

    http://www.elecbyte.com/

    Thanks for any info. I am a total VB noob so I bet it is something easy or at least I hope it is.

    P.S. I am using VB express 2010.

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: Using VB Express to run an exe or bat file problem.

    What I'd do is right click on the exe file and look at it's properties. There might be some arguments it uses in order to run properly

  3. #3
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: Using VB Express to run an exe or bat file problem.

    It may also require the working directory to be set to the directory that the app is in ....

    try first in your bat file to add this line at the top..
    Code:
    cd\Users\Mary\Downloads\mugen100\mugen1
    the cd command in dos changes the working directory... report back if this does help ...
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  4. #4
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Using VB Express to run an exe or bat file problem.

    I would think the directory is the issue. The cd command in the post above should correct the problem.
    Always use [code][/code] tags when posting code.

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

Featured