Page 1 of 1
Visual Basic 2005 question......
Posted: Sat Nov 04, 2006 1:27 pm
by GrantLS
say if i made some code that runs an exe (like a setup exe) how would i make it so that VB 2005 will compile that program with the code I made so that I dont have to have the program i told it to run on my PC at run time? (because it will be in the compiled code so i can run it on any PC)
Sorry if it sounds confusing, its the best way I coul phrase it
Posted: Sat Nov 04, 2006 1:30 pm
by dos mes
I'm not sure what you mean? Are you saying that you can only run your project by pressing the debug button?
If that's the case, you have to go to Project->Build, and it will make an exe of your app in the folder you saved its project to. Like this. Project folder(probably Your Documents->Visual Studio 2005->Projects->Project Name)->Bin->Release...Along those lines.
Otherwise if you mean to run it on any computer like a Mac and Linux and PC and stuff, that wont work with Visual Studio. But I don't think thats what you meant anyways.
Hope I helped at least a bit.
Posted: Sat Nov 04, 2006 1:35 pm
by GrantLS
Dos Mes wrote:I'm not sure what you mean? Are you saying that you can only run your project by pressing the debug button?
If that's the case, you have to go to Project->Build, and it will make an exe of your app in the folder you saved its project to. Like this. Project folder(probably Your Documents->Visual Studio 2005->Projects->Project Name)->Bin->Release...Along those lines.
Otherwise if you mean to run it on any computer like a Mac and Linux and PC and stuff, that wont work with Visual Studio. But I don't think thats what you meant anyways.
Hope I helped at least a bit.
No what i ment is.. well kinda like an AIO, run programs by clicking a button in my own program BUT instead of the programs being scatterd about on my HDD they are inside my program that opens them, all programs are in one program (so i could use it on another computer)
... ah crap... I am talking about an AIO.. how do i do it, I have some VB 2005 experiance.
Posted: Sat Nov 04, 2006 7:47 pm
by xbox7887
I'm not sure about VB but in C# you use...
Posted: Sun Nov 05, 2006 3:05 am
by LuxuriousMeat
yea its the same in vb xbox. vb, c# and c++ are basically the same language but with different syntaxes
and i think you mean you want to make an installer so all the apps are in like a sub folder in the folder your app is and so they can run on other peoples computers if so make a folder with your exe called "Tools" without quotes and put your tools in that folder and for code this is an example of what you would do
Code: Select all
System.Diagnostics.Process.Start(Application.StartupPath & "\Tools\Entity\entity.exe")
(the Application.Startup path gets the path of the location where your exe was launched from)
Posted: Sun Nov 05, 2006 9:27 am
by dos mes
But he wants to launch them from within the program itself. Correct me if I'm wrong but, I think it's impossible to add a program to it's resources and launch it. Either that or it's just really annoying and a shitton of work. I say just keep the program and the files in the same directory, and just move that directory from computer to computer. Then, for VB I'm pretty sure the code would be...
or
Code: Select all
System.Diagnostics.Process.Start("NameOfFile.exe")
*NOTE* That will only start the file if it's in the same directory like I stated above. Otherwise you have to put the entire path name to the file within the parenthesis.
Posted: Fri Dec 22, 2006 12:08 pm
by Abencetardder
Posted: Fri Dec 22, 2006 12:11 pm
by Patrickssj6