473,387 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

VB program and EXE

I am very new at this type of situition and am looking
for guidance:

I am using VB.NET 2002 to write an app.
I have an .exe that needs to be incorporated into my
program. It's an RSYNC(novell synching utility)exe

I am going to get a job number and year from the user.
This will allow me to build a string of where the file is
stored in the directory.

Once I build the string I am going to run a shell command
from within my program such as:
c:\cwrsync\rsync.exe -vaz /cygdrive/c/TrussJobs/....etc

c:\cwrsync\rsync.exe (<--The exe I need to run)

Is there a way to store this file in a VB.NET program
when compiling and then copy it to the user without them
knowing it when the form is loaded so it is in place upon
submission?

OR

Is there a way to store an .exe in the program and when
trying to process the shell I can locate it somewhere?

So- in recaps, I need help distribuitng an exe to the
user in order to get my shell command to work properly.

This is not being used for corruption but to save my
users from needing to terminal in to our central location
and copy data. RSYNC can handle the copying of data for
us freeing up a lot of time and reducing bandwith greatly
since it compresses on the fly.

Thanks for any suggestions!
Nov 20 '05 #1
2 4162
brian wrote:
c:\cwrsync\rsync.exe (<--The exe I need to run)

Is there a way to store this file in a VB.NET program
when compiling and then copy it to the user without them
knowing it when the form is loaded so it is in place upon
submission?


If you can't just bundle the exe as a separate file with your own app, you
could embed the exe in your program as a resource.
You can then access it as a stream, write that stream out to a file and then
Shell out to that file when you need to use it. You can get at the embedded
resource stream using this:
Reflection.Assembly.GetExecutingAssembly().GetMani festResourceStream("MyApp.rsync.exe")

To get the file as a resource in your app, just add it to the project in
VS.NET and set its build action to "Embedded Resource".

--
Sven Groot

http://unforgiven.bloghorn.com

Nov 20 '05 #2

Thanks for the reply.

By chance would you be able to give an example on how to write the
stream to a file?

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
22
by: edgrsprj | last post by:
PROPOSED EARTHQUAKE FORECASTING COMPUTER PROGRAM DEVELOPMENT EFFORT Posted July 11, 2005 My main earthquake forecasting Web page is: http://www.freewebz.com/eq-forecasting/Data.html ...
0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
11
by: christopher diggins | last post by:
I am wondering if any can point me to any open-source library with program objects for C++ like there is in Java? I would like to be able to write things like MyProgram1 >> MyProgram2 >>...
1
by: Eric Whittaker | last post by:
hi all, im trying to write my first c++ program. a success, but i can't get the window to stay open after user enters input. it just automatically closes. right now the end of my program looks...
9
by: Hemal | last post by:
Hi All, I need to know the memory required by a c program. Is there any tool/utility which can give me the memory usage in terms of DATA segment, TEXT segment, BSS segment etc. I am working...
7
by: ibtc209 | last post by:
I just started programming in C, and I need some help with this problem. Your program will read the information about one MiniPoker hand, namely the rank and suit of the hand’s first card, and...
2
Banfa
by: Banfa | last post by:
Posted by Banfa The previous tutorial discussed what programming is, what we are trying to achieve, the answer being a list of instructions constituting a valid program. Now we will discuss how...
0
amitpatel66
by: amitpatel66 | last post by:
There is always a requirement that in Oracle Applications, the Concurrent Program need to be execute programatically based on certain conditions/validations: Concurrent programs can be executed...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.