VB.NET include .exe in project and attach to main process - vb.net

I have a VB.NET project (main.exe) and include an additional .exe application as internal resource. Now I do not want to run the extra .exe as a separate process but want to attach it to the process of main.exe so I have just 1 process overall and not 2.
Can this be done somehow?
Thanks

The solution is to compile the additional.exe as .dll and use it in VB.NET

Related

Determine which .dll (.tlb) running

My .exe contain a lot dlls added through reference or as .CreateObject .
I wonder is there any way when i open some dll to find in processes or somewhere else which .dll is currently in use
Just use Process Explorer from sysinternals by truning on View->Lower Pane View->DLLs (Ctrl+D) and then clicking on your application process in processes list.
With Find->Find Handle or DLL (Ctrl+F) you can search for DLLs and other files being open by any system process, e.g. when you need to delete a data files but the OS refuses for file being in use reason and not telling you which one the culprit is.

Embedding and Deploying ressources into VB project

I got a problem with some ressources. I got a simple .exe file, that is accessed by my application. So I saved the exe tool within my project folder and everything was simple. But now I want the exe to be embedded inside my application, to keep everything nice and clean.
I want my app to be a single file executable, that will deploy its dependencies and stuff on its own.
So read a little tutorial on stack: How to embed dll from "class project" into my project in vb.net
I got the .exe into my ressources and pasted the code into my ApplicationEvents.vb (don't kill me for CP ;) ). Next I tried to execute the whole thing, but nothing happend. By executing the application step by step (F8), I saw, that the AddHandler call is executed, but the Deploy Function gets never called.
Next I read a tutorial at MSDN:
https://msdn.microsoft.com/en-us/library/vstudio/e2c9s1d7%28v=vs.100%29.aspx
I tried to change the persitence mode of my ressource as described, but the Persistance option is disabled.
So what can I do to deploy my second .exe?

I would like to have my AssemblyVersion in my deployment package name

I am using MSbuild to create a deployment package (simply copying various files from the projects in my solution to different folders) I would like the root folder to be of the format
DeploymentPackage2.3.4.5ForRelease
How can I get MSbuild to put the Assembly number in the folder name automatically?
EDIT:
The solution has a great deal of projects in it (too many really) they all get their version number from a SharedAssemblyInfo.cs file that is manually updated but in the fullness of time will pick up the svn build number (but that is a job for later)
I am building using an external .bat file that calls a custom written .targets/.proj setup that simply calls msbuild on the .sln of the solution.
The 'create package' step I am trying to create happens after a succesful build and will eventually be run by our CI framework, however I would like to be able to run it locally too.
I have created a "CreatePackage" target that does the copying that I want, however it is currently into a fixed folder. I need the folder name to reflect the AssemblyVersion of one of the final dll's.
If there is a better way then I want to know about it... but I am going to use this I think
MSBuild Task to read version of dll

Include executable in another executable

Can I include an .exe file in another, and then run it from the outer program?
For instance, can I make a wget GUI by including it inside my program, or are my only options either using the including the source or supplying the wget binary together with my wrapper?
I am working on Windows and am looking for a solution in c/c++/c#
Sure you can.
The idea is to 'insert' the exe as a resource to you main application.
There is a link which explains how to compile resources into delphi exe. Its similar to VC++ or what ever...

Problems with running WMV in VB.Net

I just finished building my program, but I noticed that vb.net (2010) creates two dll files ( AxInterop.WMPLib.dll & Interop.WMPLib.dll ), when I tried to run the application without having those two files in the same directory, it crashed right away!!!
Is there a way, to have the WMV components running without using any additional libraries, so I can distribute the exe file only?!!!
Thanks
I used a program called smartassembly, to protect the source of my program.
The program itself asked me if I want to merge dependencies (resources), so I picked the two dll files, and it me out one executable file, with no dll files at all.