473,797 Members | 2,970 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 9650
"Just D." <no@spam.please > wrote in message
news:6VUNc.1115 $wz.778@fed1rea d01...
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.LoadFr om? 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@fed1rea d01...
| 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@fed1rea d01...
| 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@fed1rea d01...
| 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
6193
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 the DLL above. Now the application, together with the above DLL’s is successfully loading a TIF image file (62992 x 113386 Pixels, Huffman RLE compression, 3200 x 3200 DPI resolution, binary colored (1 Bit Per Pixel), file on disk size 43.08...
3
1496
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. another question i have is re' datagrid i hope someone might be able to help with, say i have the xml <employee>
4
1334
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? Thanks in advance
19
5259
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 application under heavy load. When increasing the number of requests, all my memory is filled, and the Linux server begins to cache and remains frozen. ab -n 100 -c 10 http://localsite/testscript
17
5087
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 cached and methods on which are called by n threads ( n is approx = 25 ) )
2
2950
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 which causes zz as expected the second showdialog(formx) causes 1 form_load event which causes zz as expected
1
2746
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 into memory...
3
5550
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 memory and unable to find a dll - webengine.dll. They have tried rebooting, gettling latest, and a few other things. We can not determine what is at the heart of this problem. They have Visual Studio.Net 2005 with .Net Framework 2.0 SP1. The...
5
4124
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: Server/IIS: ----------- IIS 6 running on Hosted VPS Windows 2003 Enterprise, with allocated 512MB
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9536
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10468
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10205
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10021
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9063
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6802
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5458
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.