I want to import and run a another app using Process.Start
. But I cannot import exe files to my vb project. How do I do this... Again, I want to add another exe file to my project... I know how Process.Start
works but it's only run program out of this project.
Thank you
Asked
Active
Viewed 167 times
0

Trevor
- 7,777
- 6
- 31
- 50

NoobNotFound
- 3
- 4
-
The best solution is to make DLL of that project and import it into your current project – Vivek S. Jun 03 '21 at 13:02
-
1https://stackoverflow.com/a/3864404/17034, pick the EXE file. – Hans Passant Jun 03 '21 at 13:14
1 Answers
0
In general you have two options.
- You can ship/pack/distribute the other exe with your programm. And just execute it from the path that your exe is runing from something like
IO.Path.GetDirectoryName(Reflection.Assembly.GetEntryAssembly.Location) & "\Another.exe"
or
- You can embed the another file as a resource into your resources (My project/Resources/Add Resource/Add existing file). Distribute your single
exe
. And then save that internal resource (My.Resources.YourFileName.Save(..)
) to some directory (likeIO.Path.GetTempPath
) and execute it withProcess.Start

PavlinII
- 1,061
- 1
- 7
- 12
-
-
Example of what? I tried to give you example of functions that you'll need. – PavlinII Jun 07 '21 at 11:57