Results 1 to 15 of 15

Thread: [RESOLVED] My project does not work on Windows7

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2008
    Posts
    91

    Resolved [RESOLVED] My project does not work on Windows7

    Hello guys, I made a program and it worked perfectly for me.
    I gave it to one of my old pals, and it worked just as perfect for him.
    We both have WindowsXP.

    I send 2 new copies of the project to another friends, they have Windows7, it crashes.

    I've tried googled it but didn't get any good answers so I'm turning to you guys, again.. If anyone have any experience with this and have a solution, please give me a reply!

    This is my code:
    Code:
    Dim ProcessProperties As New ProcessStartInfo
    ProcessProperties.FileName = "ventrilo/mumble/mumble.exe"
    ProcessProperties.WindowStyle = ProcessWindowStyle.Maximized
    Dim myProcess As Process = Process.Start(ProcessProperties)

    This is the error report:
    Code:
    System.ComponentModel.Win32Exception: Cannot find the file
       vid System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
       vid System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
       vid WindowsApplication1.Form1.PictureBox4_Click(Object sender, EventArgs e)
       vid System.Windows.Forms.Control.OnClick(EventArgs e)
       vid System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       vid System.Windows.Forms.Control.WndProc(Message& m)
       vid System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       vid System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    
    mscorlib
        Sammansättningsversion: 2.0.0.0
        Win32-version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
    
    ----------------------------------------
    Ventmix
        Sammansättningsversion: 1.2.0.0
        Win32-version: 1.2.0.0
        CodeBase: file:///C:/Program%20Files%20(x86)/Ventmix.exe
    ----------------------------------------
    Microsoft.VisualBasic
        Sammansättningsversion: 8.0.0.0
        Win32-version: 8.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
    ----------------------------------------
    System
        Sammansättningsversion: 2.0.0.0
        Win32-version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Windows.Forms
        Sammansättningsversion: 2.0.0.0
        Win32-version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
        Sammansättningsversion: 2.0.0.0
        Win32-version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Runtime.Remoting
        Sammansättningsversion: 2.0.0.0
        Win32-version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
    ----------------------------------------
    System.Windows.Forms.resources
        Sammansättningsversion: 2.0.0.0
        Win32-version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_sv_b77a5c561934e089/System.Windows.Forms.resources.dll
    ----------------------------------------
    mscorlib.resources
        Sammansättningsversion: 2.0.0.0
        Win32-version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
    ----------------------------------------
    System.Xml
        Sammansättningsversion: 2.0.0.0
        Win32-version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------

  2. #2
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: My project does not work on Windows7

    The exception tells you the problem, it can't find the executable in the location you have given it. You need to fix the location somehow or ensure the user is running with the layout you require and execute it from the correct directory.

  3. #3
    Fanatic Member amrita's Avatar
    Join Date
    Jan 2007
    Location
    Orissa,India
    Posts
    888

    Re: My project does not work on Windows7

    What is the exact loaction of the [mumble.exe ] ? It may ba permission issue. Please try to run the exe by right clicking on it and selecting [Run As Administrator].
    thanks
    amrita

  4. #4
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: My project does not work on Windows7

    The OP posted that already:

    ProcessProperties.FileName = "ventrilo/mumble/mumble.exe"

    The path does not include a drive nor a root so the location is from your current folder which is why I did not suggest how to fix it as that will all depend on how the app should be used and/or distributed.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Feb 2008
    Posts
    91

    Re: My project does not work on Windows7

    I see..
    well here's how I tried to make this:
    I wanted a stand alone .exe, if I publish my work I only get a .manifest file that works almost like a standalone .exe, difference is that it looks like it's getting virus scanned everytime you start it.

    I took all the .exe's and including folders etc to Bin/Release/ventrilo/mumble/->laid them here<- and then ran from the program "Ventrilo/mumble/mumble.exe"

    Now the weird part is that, it works for XP but not for Windows7?

    What do you guys think I should do? I tried copy all the folders to the .resources folder but I couldn't be able to launch .exe from resources.

  6. #6
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: My project does not work on Windows7

    I don't think its a windows 7 thing, rather an environment thing. Answer a few questions.

    Where should the application you are calling (mumble.exe) be located. Is it in program files, is it on the desktop, is it part of your installation so always "your app path\ventrilio\mumble" (it should be backslashes btw, not forward).

    At a guess your app path is: "C:\Program Files (x86)\Ventmix.exe", so the location of the .exe you are running I would guess is "C:\Program Files (x86)\Ventrilo\mumble\mumble.exe".

    So your choice is to either get directory your application is current running in and append the .exe path

    Code:
    Dim strPath As String = IO.Path.Combine(System.Reflection.Assembly.GetExecutingAssembly.Location, "Ventrilio\mumble\mumble.exe")
    Or you can get the program files directory

    Code:
    Dim strPath As String = IO.Path.Combine(System.Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "Ventrilio\mumble\mumble.exe")
    Not tested, but something like that.

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Feb 2008
    Posts
    91

    Re: My project does not work on Windows7

    Hello Grim, thank you for the replies!
    Well at that time I had it something like this:
    C:/programs/Application/bin/release/Ventrilo/mumble/mumble.exe
    So I ran the program from application folder.

    Well basically I want to run the the executers within the application folder, because I don't want an installer and also so people's computers can find my application resources.

    offtopic; I installed Windows7 today and also VS2010 just because I guess It's time to upgrade yourself along with microsoft, I remember I was totally stuck with Visual basic 6 until I read the sticky forum thread about why you should upgrade yourself.

  8. #8
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: My project does not work on Windows7

    So what is the result .

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Feb 2008
    Posts
    91

    Re: My project does not work on Windows7

    Wow that's a fast reply! Well I've just started up VS2010 and rebuilt the interface, and you seem to be online right now.. would you mind adding my msn, so we could have a REAL time conversation?
    Last edited by macbrutal; Aug 3rd, 2010 at 10:32 AM.

  10. #10
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: My project does not work on Windows7

    Nope, keep it to the forums, helps others learn .

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Feb 2008
    Posts
    91

    Re: My project does not work on Windows7

    Oh that's right, ofcourse, my bad!
    Give me another 5 minutes and I'll see what's going inside my program.

    Oh and one more thing, if I compile and run my program, where exactly is this program running from?
    I mean, It could be WindowsApplication1 which is outside the folder Windowsapplication1
    And it could be WindowsApplication1, which is inside that folder
    and also bin/debug.

  12. #12
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: My project does not work on Windows7

    I did this in another post about 5 seconds ago , run this and it will tell you.

    Code:
    MessageBox.Show(Application.StartupPath)

  13. #13

    Thread Starter
    Lively Member
    Join Date
    Feb 2008
    Posts
    91

    Re: My project does not work on Windows7

    Startuppath:
    Voicemix\Windowsapplication1\bin\debug
    I placed a folder called ventrilo there (Voicemix\Windowsapplication1\bin\debug\ventrilo)
    within that folder (ventrilo) there's a .exe called: Ventrilo 2.1.4.exe

    Code:
    Code:
    Dim strPath As String = IO.Path.Combine(System.Reflection.Assembly.GetExecutingAssembly.Location, "Ventrilo/Ventrilo 2.1.4.exe")
    Shell(strPath)
    I tried "\" and "/"

    Compile (And the compiler in VS10 is SLOOOW)
    Run, and I get an error: File's not found.

    Isn't it possible to put all the files into resources and then run the .exe from my.application.resources ?
    Last edited by macbrutal; Aug 3rd, 2010 at 10:58 AM.

  14. #14
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: My project does not work on Windows7

    You can put all the filepaths into My.Settings would be more like it, putting other apps into your own resource files is not good. There is a post today about extracting files from exe on vmware that has this exact subject.

    Code:
    Dim strPath As String = IO.Path.Combine(Application.StartupPath,"ventrilo\Ventrilo 2.1.4.exe")
    Process.Start(strPath)

  15. #15

    Thread Starter
    Lively Member
    Join Date
    Feb 2008
    Posts
    91

    Re: My project does not work on Windows7

    Worked like a charm, thank you so much!

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