473,378 Members | 1,334 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,378 software developers and data experts.

Load EXE and run from memory - is it possible in C# ?

Hi All,

I have a question. I need to load some EXE file into memory and then find a
way how to run it from the memory without saving to disk. I know that it was
possible in C++ to execute any code already loaded into memory. What about
C#? Does anybody know how to do that?

The main purpose - to download a small installer from my www and then using
this installer to download some big installer (like SETUP.EXE) and run it
without saving to a client disk. That's a requirement, the purpose is to
keep the client always up-to-date and don't allow him to keep old installer
files on the remote machine. The small installer should test the remote
application version and understand what version is running to stop it and
update if it's needed.

Thanks,
Dmitri.
Nov 16 '05 #1
6 9628
"Just D." <no@spam.please> wrote in message
news:6VUNc.1115$wz.778@fed1read01...
Hi All,

I have a question. I need to load some EXE file into memory and then find a way how to run it from the memory without saving to disk. I know that it was possible in C++ to execute any code already loaded into memory. What about
C#? Does anybody know how to do that?

The main purpose - to download a small installer from my www and then using this installer to download some big installer (like SETUP.EXE) and run it
without saving to a client disk. That's a requirement, the purpose is to
keep the client always up-to-date and don't allow him to keep old installer files on the remote machine. The small installer should test the remote
application version and understand what version is running to stop it and
update if it's needed.

Thanks,
Dmitri.


Why not use Assembly.LoadFrom? It can load assemblies from the web:

http://msdn.microsoft.com/library/de...fromtopic1.asp

Erik
Nov 16 '05 #2
Dimitri,

AFAIK, This is not possible in C#. But, if this is a .NET application, you
may want to look into self-updating applications.

http://msdn.microsoft.com/library/de...ml/updater.asp

--
HTH

Kyril Magnos
"I'm not a developer anymore, I'm a software engineer now!" :-)

"Just D." <no@spam.please> wrote in message
news:6VUNc.1115$wz.778@fed1read01...
| Hi All,
|
| I have a question. I need to load some EXE file into memory and then find
a
| way how to run it from the memory without saving to disk. I know that it
was
| possible in C++ to execute any code already loaded into memory. What about
| C#? Does anybody know how to do that?
|
| The main purpose - to download a small installer from my www and then
using
| this installer to download some big installer (like SETUP.EXE) and run it
| without saving to a client disk. That's a requirement, the purpose is to
| keep the client always up-to-date and don't allow him to keep old
installer
| files on the remote machine. The small installer should test the remote
| application version and understand what version is running to stop it and
| update if it's needed.
|
| Thanks,
| Dmitri.
|
|
Nov 16 '05 #3
Thanks for these answers. That's bad, but the main SETUP.EXE is written in
VB6 and my task is to write an installer. I can use C++ but I don't have a
ready code to download installer from a password protected FTP server. I
have this code written in C# and want to use it.

Dmitri.

"Kyril Magnos"
AFAIK, This is not possible in C#. But, if this is a .NET application, you
may want to look into self-updating applications.

http://msdn.microsoft.com/library/de...ml/updater.asp
Nov 16 '05 #4
What about InstallShield's "Install From The Web" technology for the setup
packages and a background C# app to monitor and remove the local installer
files? Would that work?

Also, did you ever get that VB6 app upgraded and moved into C#? (I have a
good memory... lol)

--
HTH

Kyril Magnos
"I'm not a developer anymore, I'm a software engineer now!" :-)

"Just D." <no@spam.please> wrote in message
news:viVNc.1119$wz.135@fed1read01...
| Thanks for these answers. That's bad, but the main SETUP.EXE is written in
| VB6 and my task is to write an installer. I can use C++ but I don't have a
| ready code to download installer from a password protected FTP server. I
| have this code written in C# and want to use it.
|
| Dmitri.
|
| "Kyril Magnos"
|
| > AFAIK, This is not possible in C#. But, if this is a .NET application,
you
| > may want to look into self-updating applications.
| >
| >
|
http://msdn.microsoft.com/library/de...ml/updater.asp
|
|
Nov 16 '05 #5
Hi Kyril,
What about InstallShield's "Install From The Web" technology for the setup
packages and a background C# app to monitor and remove the local installer
files? Would that work?
Did you see that for VB6?-)
Also, did you ever get that VB6 app upgraded and moved into C#?
Physically it wasn't my application. I gave some recommendations..., and
that's all. It's still VB.s

(I have a good memory... lol)

That's a very good advantage...)
"I'm not a developer anymore, I'm a software engineer now!" :-)


Looks like the same...)

Dmitri.
Nov 16 '05 #6
"Just D." <no@spam.please> wrote in message
news:21WNc.1123$wz.671@fed1read01...
| Hi Kyril,
|
| > What about InstallShield's "Install From The Web" technology for the
setup
| > packages and a background C# app to monitor and remove the local
installer
| > files? Would that work?
|
| Did you see that for VB6?-)

http://www.installshield.com/products/setup/update.asp

That might help :-) I know for a fact that you can use InstallShield for
VB6, but this might be even more suited to your needs.

|
| > Also, did you ever get that VB6 app upgraded and moved into C#?
|
| Physically it wasn't my application. I gave some recommendations..., and
| that's all. It's still VB.s
|

Sounds like a lot of places I have worked at. ;-)

| (I have a good memory... lol)
|
| That's a very good advantage...)
|
| > "I'm not a developer anymore, I'm a software engineer now!" :-)
|
| Looks like the same...)

You know, that is what I told my manager, and he said that it is different
in terms of pay. So I accept it. lol

|
| Dmitri.
|
|
Nov 16 '05 #7

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

Similar topics

12
by: Sharon | last post by:
I’m wrote a small DLL that used the FreeImage.DLL (that can be found at http://www.codeproject.com/bitmap/graphicsuite.asp). I also wrote a small console application in C++ (unmanaged) that uses...
3
by: Dave Brown | last post by:
Hi All, Is it possible to examine the progress of a XMLDocument.Load method ? Sometimes my documents might be quite large so I want to give the user some indication of the size and progress. ...
4
by: Li Pang | last post by:
Hi, Instead of openning an Excel Worksheet from a file, I set the content of the file into a string (stays in the memory) and I'd like to load it into an Excel Worksheet. Anybody knows how? ...
19
by: Alex Madon | last post by:
Hello, I am testing a web application (using the DBX PHP function to call a Postgresql backend). I have 375Mb RAM on my test home box. I ran ab (apache benchmark) to test the behaviour of the...
17
by: John A Grandy | last post by:
For a Hashtable that is expected to contain no more than 100 DictionaryEntry elements , what is the best load factor ? ( This Hashtable is a encapsulted in a class , an instance of which is...
2
by: Franky | last post by:
Threre is a Form containing a usercontrol In the form's Load event it references a usercontrol property, say, zz The first showdialog(formx) causes 1 usercontrol_load event 2 form_load event...
1
by: priyachari | last post by:
Can anybody here suggest me whether loading an XML file directly into a shared memory is possible through IPC or should i parse the XML file and load the contents into an structured array and load it...
3
by: =?Utf-8?B?TGV3aXMgTW90ZW4=?= | last post by:
Hello. We are having a problem here trying to compile C# applications. Only one developer has a problem where they attempt to compile the application and the compiler complains about being out of...
5
by: Med | last post by:
Hi, Initial load of my pre-compiled ASP.NET app takes more than 50 seconds to load after site has been idle for a while. Then it become fairly fast. Followings are my app/hardware configs: ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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...

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.