make a project that can be RUN (not installed) of a CD/DVD

blkshdw88

Member
Joined
Jan 28, 2006
Messages
9
Programming Experience
Beginner
hi all,
i would like to make a project that can be RUN (not installed) of a CD/DVD or off any folder and only run from that location. The reason for this is that i would like to be able to use the Shell() command to .exe's inside the folder that the project is in. eg. if i have a few exe's on a cd as well as my project i could just go 'Shell("abc.exe")' without a path because it should assume that it means abc.exe in the same path as the running project.
I have been told that to do this in Visual Basic .NET 2005 that i have to make a setup project and import my first project that i have made (with the shell commands), is this true?? i have tried to make a setup project but it does not install or run or do anything with my first project?!

also i had some success with the shell commands by copying the contents of /myproject/bin/Release , but because it isnt published you cannot detect if a computer has .net framework or not and i really need it to be able to do this? in other words if i use /bin/release i can use the shell commands properly and put the folder anywhere i want just like visual basic 6.0, and if i use the published project i can detect for .net framework but not use shell commands as the running directory (application.startuppath) is a temporary one.

can anybody make a suggestion so i can get both the shell commands and .net framework detection (and installation if necessary) to work?

thanks,
Stuart
 
I would use Process.Start instead of Shell

also if the .net framework is not installed on the computer none of your .net programs will run, they'll all produce an error message if you try to run them without the framework being installed

also you dont have to reference any of the other projects in any of your projects because if you know the final output will be in the same folder, or a fixed structure then you can just hard code the needed info for running the other programs on the cd

such as:
Process.Start(Application.StartupPath & "\YourExe.exe") which will run the exe file named "YourExe" that's in the same folder as the exe that's currently running
 
thankyou for your reply juggalobrotha... i think that the Process.Start(Application.startuppath & /abc.exe would work for if the project is not published but i really need the project to be published as it can detect if a computer has .net framework or not and install it if it doesnt have it.. its an option that i found when publishing my project the first time. The funny thing is when i publish the project the project directory may be on a cd or wherever i want it to be and i can have my .exe's in there BUT... when i run the project exe it is running from a temporary location in x:\docs and sett\user\local sett\etc etc\projectname\ .. so the exes will not load because they will never be in the startuppath if it is a temporary one. sorry its very hard to explain and i hope you all understand what im talking about .. ive been standing still on this one for a while
 
sorry i thought it belonged in the general section after i posted in deployment but oviously not.. well does anybody have any ideas?
 
im beginning to think that with no replys that what i would like to do is not possible on .net framework?? is it hard to make the end result check for .net framework and if not installed install it as well as running the project in the same directory as stored?????
 
blkshdw88 said:
im beginning to think that with no replys that what i would like to do is not possible on .net framework?? is it hard to make the end result check for .net framework and if not installed install it as well as running the project in the same directory as stored?????

It is not possible to be acomplished with .NET as you can run none of your programs if there is not .NET FW installed on the target computer. However, you can check for .net framework and if not installed install it with other languages like C++ or even VB6 may be very useful for the purpose.

Regards ;)
 
Back
Top