?
Solved

Any way to avoid installing .net run time with VB.net

Posted on 2006-04-18
15
Medium Priority
?
239 Views
Last Modified: 2013-11-13

I am working on an industrial control system whose HMI (Human machine Interface) is windows based. It is a highly secure and controlled system and parts of it run on NT, 2000 and XP.  I am not permitted to to install any software on it, but I can run my applications from a USB memory stick.

The XP boes already have .net, but the NT and 2000 do not.

My problem is this: I have wriiten some tools in VB.NET (2003) that help me with my work and I would like to use these WITHOUT installing the .NET run time on the machine.  I could rewrite the application in VB 6.0, but it would be much more difficult.

Question

1) Is there anyway to generate a completely self contained application that runs standalone? (300 pts)


0
Comment
Question by:Christopher Schene
  • 5
  • 2
  • 2
  • +4
14 Comments
 
LVL 25

Assisted Solution

by:SStory
SStory earned 600 total points
ID: 16478178
There is software that takes the static .NET code library and your code and compiles it by doing static linking.  This would probably do what you want.

In doing this you are:

Precompiling the code to the least common denominator and may not get all of the performance out of a specific machine that you otherwise would.  You are also circumventing the beauty of code reuse of the dotnet library.  Your software is also forever tied to a particular version and if patches and the like come out you want get them.  There are many negatives to doing this, but I understand why you are doing it.

Look at
 http://www.remotesoft.com/linker/

There are others.

HTH

0
 
LVL 11

Accepted Solution

by:
WelkinMaze earned 600 total points
ID: 16478223
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 16478281
WelkinMaze...the solution in that thread was to write the app in pure UNMANAGED C++.net.  This means it was essentially written in pure C++ without the use of any of the classes in the .net framework and therefore the framework would not be needed.

If cschene doesn't want to convert to VB.Net code to VB6, why would he want to convert to C++?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 11

Expert Comment

by:WelkinMaze
ID: 16478338
Idle_Mind, I'm not very familiar with .NET. I've seen in that thread that it is impossible to do standalone installation of VB.Net application, so I've posted it here in order cschene to see it. If the mentioned there is not true, sorry.
0
 
LVL 11

Expert Comment

by:WelkinMaze
ID: 16478347
I have not had intention at all to make him to write it in C++. Just trying to help and save his time. Sorry again if the mentioned in the thread is not right.
0
 
LVL 32

Assisted Solution

by:jhance
jhance earned 400 total points
ID: 16478503
I think you're going to find that the answer to this question is NO.  You cannot run .NET code on any machine which lacks the CLR (common language runtime) installed.  This also known as the .NET framework and it is the "CPU" that runs all .NET code.  Without it Windows does not have any way to run CLR code.

I think it's quite unfortunate (and indeed stupid) that Microsoft fails to include the .NET runtime as a standard component of Windows.  In my opinion, XP should have included .NET in-the-box!!  But that's another story.
0
 
LVL 8

Assisted Solution

by:Leo Eikelman
Leo Eikelman earned 200 total points
ID: 16478661
If you want to run VB code without the .NET runtime then you are going to have to code it using pure VB.  

The answer to your initial question is no you can not avoid installing the run time.

Leo
0
 
LVL 11

Expert Comment

by:WelkinMaze
ID: 16478730
Idle_Mind, can you please tell me what is the problem with my initial posting since as I see already some other experts confirm the information in the posted link by me? Is this information incorrect? Because if it is correct than it is perfectly answers the initial question in this thread. I'm really curious what is the problem.
0
 
LVL 32

Expert Comment

by:jhance
ID: 16478948
Of course the problem may still be there with VB.  VB6 code requires the VB runtime library which also must be installed on the target system.  It's also not standard with Windows so you may end up having to do the same thing...

A "completely self contained application that runs standalone" is one that will use ONLY the standard Windows libaries.  VB is unable to do that.  Your only real options Visual C or C++ using the WIN32 API or another language environment that is similar and only uses WIN32 API.  VB, Delphi, and .NET, as well as most other non-C/C++ environments use their own runtimes.  About the only other one I can think of is MASM.
0
 
LVL 86

Assisted Solution

by:Mike Tomlinson
Mike Tomlinson earned 200 total points
ID: 16480201
You are all correct in that an UNMODIFIED VB.Net executable must have the .Net Framework installed to run.

But did none of you visit the link provided by SStory in the very first comment in this thread?

Using that approach you can convert your VB.Net app into a STANDALONE app that WILL run WITHOUT the Framework installed.  It may be bigger than before but it claims not to be as big as the entire framework (unless you used every function, class, and namespace in your app which I think is very unlikely).

Here are some more products that claim to do this as well:
http://thinstall.com/solutions/net_virtual.php
http://www.xenocode.com/Products/Postbuild/Features.aspx
0
 
LVL 11

Expert Comment

by:LordWabbit
ID: 16498671
We used the trial version of thinstall for a client, it works 100%, absolutely lovely, it takes all the bits of the framework you used and packages it in the exe.  It can even take your dll's etc and package them into the exe so you only have one file.  It also mimics the windows registry so that if a user does not have registry permissions the application will still run.  The cost of thinstall is really steep however and at the end of the day our client decided not to foot the bill so...
If the trial version is still available you could use it, I think the trial period was 14 days hopefully long enough for you to finish what you need to do.
0
 

Author Comment

by:Christopher Schene
ID: 16569366
Hi,

I just got back from a business trip.

Thanks for your answers. I have gotten several good answers, so I am striggling with how to split the points..

Any suggestions?
0
 
LVL 11

Expert Comment

by:WelkinMaze
ID: 16569381
Hi cschene.
Splitting the points is up to you. Split them the way you feel it is right.
0
 

Author Comment

by:Christopher Schene
ID: 16745027
I have increased points and will split it between several of you

Thanks for your help...I have been out of town for a while on a controls project
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Simple Linear Regression

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question