-
Aug 2nd, 2010, 05:07 AM
#1
Thread Starter
Lively Member
[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
----------------------------------------
-
Aug 2nd, 2010, 05:16 AM
#2
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.
-
Aug 2nd, 2010, 05:17 AM
#3
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].
-
Aug 2nd, 2010, 05:52 AM
#4
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.
-
Aug 2nd, 2010, 12:44 PM
#5
Thread Starter
Lively Member
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.
-
Aug 2nd, 2010, 04:56 PM
#6
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.
-
Aug 3rd, 2010, 10:20 AM
#7
Thread Starter
Lively Member
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.
-
Aug 3rd, 2010, 10:25 AM
#8
Re: My project does not work on Windows7
So what is the result .
-
Aug 3rd, 2010, 10:28 AM
#9
Thread Starter
Lively Member
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.
-
Aug 3rd, 2010, 10:30 AM
#10
Re: My project does not work on Windows7
Nope, keep it to the forums, helps others learn .
-
Aug 3rd, 2010, 10:33 AM
#11
Thread Starter
Lively Member
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.
-
Aug 3rd, 2010, 10:41 AM
#12
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)
-
Aug 3rd, 2010, 10:47 AM
#13
Thread Starter
Lively Member
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.
-
Aug 3rd, 2010, 11:02 AM
#14
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)
-
Aug 3rd, 2010, 11:30 AM
#15
Thread Starter
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|