-
Oct 20th, 2016, 01:56 AM
#1
Thread Starter
Lively Member
Is possible to embedd simple app into solution?
Hi!
I'm creating GUI for command line application.
Application is small program (have not source code) - single file.
Is possible to embedd it into solution and call it from code?
For example:
Clicking OK performs:
app.exe -c1 inputfile outputfile
Thank you for each help.
Miro
-
Oct 20th, 2016, 02:21 AM
#2
Re: Is possible to embedd simple app into solution?
You would simply deploy the EXE to the same folder as your own EXE. You can then execute it with a call to Process.Start, e.g.
vb.net Code:
Dim filePath = Path.Combine(Application.StartupPath, "app.exe")
Process.Start(filePath, "-c1 inputfile outputfile")
In theory, you could embed the other EXE into your own as a resource and then extract it on demand but that is often flagged as questionable behaviour by anti-malware programs.
-
Oct 20th, 2016, 03:39 AM
#3
Thread Starter
Lively Member
Re: Is possible to embedd simple app into solution?
Ok, this I know - I want to avoid missing app file.
Embedding as resource is maybe for AV software "dangerous" - I can try it - but how to extract it?
In last few minutes I found source code on web but is in C, so can be used in Visual C++...
How to combine two programming languages in one solution to build single executable?
Thank you.
Miro
-
Oct 20th, 2016, 05:34 AM
#4
Re: Is possible to embedd simple app into solution?
Why would you need to combine two languages? Why wouldn't you just look for information on using resources in VB.NET? It really couldn't be easier. You simply add the file on the Resources page of the project properties and then extract it by getting a property value from My.Resources. You really shouldn't do that though. It's really quite silly to worry about a missing file. How many applications do you think there are out there that are just one file? The vast majority of applications out there require far more than two files so why is it such a drama for your application?
-
Oct 20th, 2016, 12:44 PM
#5
Thread Starter
Lively Member
Re: Is possible to embedd simple app into solution?
Ok, I understand - this app has to be portable simple tool without any folder - simple single executable.
Miro
-
Oct 20th, 2016, 05:32 PM
#6
Re: Is possible to embedd simple app into solution?
Originally Posted by MIRKOSOFT
Ok, I understand - this app has to be portable simple tool without any folder - simple single executable.
Miro
Oh, I see. Yeah, it is impossible to copy two files from machine to machine so I can see your dilemma.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|