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


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)


Christopher ScheneSystem Engineer/Software EngineerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SStoryCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:
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++?
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

WelkinMazeCommented:
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.
WelkinMazeCommented:
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.
jhanceCommented:
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.
Leo EikelmanDirector, IT and Business DevelopmentCommented:
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
WelkinMazeCommented:
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.
jhanceCommented:
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.
Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:
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
LordWabbitCommented:
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.
Christopher ScheneSystem Engineer/Software EngineerAuthor Commented:
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?
WelkinMazeCommented:
Hi cschene.
Splitting the points is up to you. Split them the way you feel it is right.
Christopher ScheneSystem Engineer/Software EngineerAuthor Commented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.