including other programs

  • Thread starter Thread starter Lynn
  • Start date Start date
L

Lynn

Hi,
I my vb.net application is calling another application (abc.exe) to run. How
can i package this abc.exe file into my vb.net application ?
thanks
 
Hello Lynn,

copy abc.exe beside your project exe in debug folder
in the code calling abc.exe use Application.StartupPath as part of your path,
so the full path is relative to your application; then when creating the
setup file add abc.exe beside your project primary output

Marwan Tarek
http://www.sharepointblogs.com/marwantarek/
 
Hello Lynn,

when you are developing you will find in the project folder, a bin folder
under it debug folder where you can find there exe of your developed application.
copy your abc.exe to there

in the code running abc.exe, you supposed to defining the path of abc.exe
define it like that
Application.StartupPath + "abc.exe"

then test it if it is fine you can start packaging
check this link for deploying windows application
http://msdn.microsoft.com/library/d.../vbtskcreatinginstallerforyourapplication.asp

notice this steps in the article

To add the Windows application to the installer

Select the My Notepad Installer project in Solution Explorer. In the File
System Editor, select the Application Folder node.
On the Action menu, choose Add, Project Output.
In the Add Project Output Group dialog box, choose My Notepad from the Project
drop-down list. Click OK to close the dialog box.
Select the Primary Output group from the list, then click OK.
On the Build menu, choose Build My Notepad Installer.

after these steps right click on teh right pane in the file system editor
and click add->File then browse your abc.exe.
then build your application and you will have a successfull setup file ;)

Ciao

Marwan Tarek
http://www.sharepointblogs.com/marwantarek/
 
Hi Marwan,
thanks for the info, but i this is not what i am looking for. I want to
package abc.exe file together with my vb.net application into one .exe file.
can this be done?
 
You could embed it as any other resource.
However if you want to execute you'll have to write the code which take the
resource and save to the disk.
 
how to go about embeding it ?

Lloyd Dupont said:
You could embed it as any other resource.
However if you want to execute you'll have to write the code which take the
resource and save to the disk.
 
With VS.NET:
right click on your project folder: add existing items.
then properties: build properties => embeded resources.
then I advise to read the SDK documentation.
and look for the documentation of method
Assembly.GetManifestResourceStream as well
 
Back
Top