building my .exe can it run anywhere?

J

Jason

Say I build a simple .exe file.

n exe that will look at a file, read that file and put the contents
into an email. If I take the .exe that I built from the Bin\Release
folder and copy it to a machine will it work or do I need to make sure
that I have dot net installed and all of this ?

What is the best way to build an .exe so that I can run it on most
machines without any updates?

thanks.
 
T

Tom Shelton

Say I build a simple .exe file.

n exe that will look at a file, read that file and put the contents
into an email. If I take the .exe that I built from the Bin\Release
folder and copy it to a machine will it work or do I need to make sure
that I have dot net installed and all of this ?

What is the best way to build an .exe so that I can run it on most
machines without any updates?

thanks.

If you use VB.NET - then you need the framework installed. There are
tools that will let you get away from this requirement, but having never
used any of them - I can't make any recomendations.

If you want a basic like language for windows with not external
dependencies, then maybe you might consider something like PowerBasic
(http://www.powerbasic.com).
 
C

Cor Ligthert[MVP]

Jason,

It will for sure not run on a PS3, on MS-Dos other ancient Microsoft OS
system.

However on a complete up to date Windows OS from this milenium it will run
(what is not Windows millenium as that is from the past first millenium).

(As long as you don't have other dependies as 3th party controls etc).

Cor
 
J

Joergen Bech

Normally you would build an installer that checked if the required
version of the .Net framework was installed before installing the
application (.exe file).

If you want to just copy and run a single .exe file without the
..Net framework installed, you can use application virtualization,
though be prepared to accept that the size of the .exe file is
going to be significantly larger.

See a screencast demo of how it can be done here (using
Paint .Net as a sample application):
http://www.thinstall.com/demos/dnet20/

If you want to distribute your app as a *small*, self-contained
..exe file, however, your best bet is to switch to something like
C++ and avoid dependencies on anything you cannot link
statically.

Regards,

Joergen Bech
 
M

Michel Posseth [MCP]

IMHO

On anny Windows computer connected to the internet it is pretty safe to
asume that the .Net framework is installed
You might even built a Installer that checks for the correct framework and
if it is not installed download and install this from the MS website

Another question might be,, do you want your programs to run on outdated
computers wich do not have the required servicpacks installed
thus users blaming your software while it are actually solved bugs ?


If the .Net framework is installed then a executable is normally XCOPY
deployable if you provide all the eventuall dependancy`s


if you really want to go low level thus application starting as native on
the Windows operating system then you might consider anny Assembly like
language .


HTH

Michel
 
J

Joergen Bech

On anny Windows computer connected to the internet it is pretty safe to
asume that the .Net framework is installed
You might even built a Installer that checks for the correct framework and
if it is not installed download and install this from the MS website

It is easy for developers and IT pros to presume and
require that everything is updated, but unless you are
running a setup program that installs the framework
automatically if needed (with all that is required is for
the user to click next next next ...), it is *not* safe to
assume that Mr. and Mrs. Jones have updated their
home computer.

First of all, there are people who consistently answer "No" to
any plea from the Windows Security Center or to the
Windows Update notification in the SysTray (I know some of
them). Second of all, last time I checked, the .Net
Framework was an optional update (this might have
changed), which means that even if a machine is configured
to install updates automatically, the framework is not included
as it is not a critical update. I think the framework service
packs are critical, but I do not remember.

Then there are the situations where the (optional?) framework
update is selected, but fails to install (due to bloatware
preinstalled on notebooks nowadays?)

In a corporate environment with a sysadmin watching
the machine park like a hawk, no problem, but never
make any assumptions about the state of a home user's
machine or the same user's ability to do anything about
it. If Internet Explorer works, that is all that matters. And
who cares if the 60-day trial version of Norton Antivirus
that came preinstalled has not been updated for two years?
The machine is still running, so why change anything?

Ok, let me make a small correction: Even in the corporate
environment do we find sysadmins who refuse to install
the framework, thinking it is going to mess with the OS.
Then there are the server admins who do not allow version
2.0 to be installed on their servers because they need to run
software that depends on version 1.1 and still harbour doubts
that the two frameworks can coexist peacefully on the same
machine.

Then there are the old machines with low memory. Try installing
XP SP2 on a tablet pc running Windows XP Tablet Edition 2005
(or whatever it is called). Installing SP2 installs Framework 2.0 AND
burdens the OS with a few system tools, so suddenly just starting
the OS takes up an additional 50MB of memory compared to when
it was just running SP1. There goes another (albeit small) group of
machines where people might be hesitant to install the framework
(as part of the SP2 install).

Finally, there are still people on dial-up connections (or worse: who
pay for the amount of traffic) who might be happy to download a 1MB
application to try it out, but not if it means downloading an
additional 50MB framework (or much more for .Net 3.5) before they
can run it.

Did I forget the latest Eee PC or OLPC craze where they are starting
to shoehorn Windows XP into 4GB of flash memory? I do not know if
..Net 2.0 is included on those machines, but I do not think there is
much left over for the owners to be wasteful with it.

I do not know the stats for .Net (consumer) market penetration,
but I do not believe we are quite there yet.

Google:
http://discuss.joelonsoftware.com/default.asp?biz.5.592012.13

Ah! I remember in the good old 90'es when I released a freeware
VB6 program and people were complaining that the installer was
6MB too large due to the VB6 runtime files and that I ought to
switch to a real programming language like Delphi. After a few
years, the complaints went away and people thought nothing
of downloading a 10MB installer. Someday, .Net will get to that
point too.
Another question might be,, do you want your programs to run on outdated
computers wich do not have the required servicpacks installed
thus users blaming your software while it are actually solved bugs ?

Even a machine that came with Windows XP preinstalled could
be considered outdated (7+ years old?) by today's standard, so
setting XP as the baseline is unlikely to cut out too large an
audience.

Regards,

Joergen Bech
 
M

Michel Posseth [MCP]

Joergen ,,

I am currently developing production apps for a company inhouse , however 2
yars ago i wrote commercial apps with a user base of 20.000 throughout
europe we investigated at that time the penetration of the .Net framework
for our customers and found that 95% of the people who had a broadband
internet connection , also had the .Net framework installed and remember
this was + 2 years ago .

I do not know how it is in you country`s , but here in the Netherlands you
are a comple fool if you internet with a dialup connection as broadband
with telephony is here cheaper as a basic telephony abo inclusive calling
costs ( 20 MB broadband inclusive free national calls for 29,90 euro a
month )

Also the following ,, i am currently sitting behind my oldest computer a AMD
XP 2400 + with 512 MB memory Windows XP Home and a harddisk of 40 GB this
computer is + 5 years old ! but is fully up to date with servicepacks and
optional components and runs verry smooth , i do not know how it is in other
country`s but my friends and family are currently all running on new Vista
computers most of them dual core machines with min 2 gigs of memory and 250
+ GB of harddisk space , ( before i even installed it on my home computer )

My point ,,, well i guess when you are developing progs for Zimbabwe or such
country`s , you must be worried about how to get the software on the
computer
however here we download complete movies of 4,3 GB in 20 minutes or so so
optionally installing the framework is no problem .

When we were moving from DOS to VB6 we asked ourself ,,,, do we want to
support "those" ( few ) customers who are unwilling to invest in modern
computers ? now i do not see anny differnce with the .Net framework .
Especially since computers are now so cheap


just my thoughts

Michel
 
J

Joergen Bech

Fiber is only now being rolled out in my country. It was only a couple
of months ago that I went from 1M/512K to 10M/10M (and now I
can get 50M/50M if I want - which I don't).

In rural areas, however, there are still a lot of people on slow
ADSL lines.

Then there are those who have a very fast ADSL connection
for next to nothing in subscription fees. The catch is that they
pay something like 7 Euro-cents per megabyte of traffic. Now,
there is a scam if I ever saw one. You can imagine that those
people only use their connection to check their email once a
day.

And I believe that USA is still somewhat behind Europe when
it comes to broadband penetration. Even when you can get a
fast connection, you are really not supposed to actually use it
for other things than surfing the web.

I agree that it is probably safe to target framework 2.0 these days.
Not so sure about 3.0 or 3.5.

At the end of the day, the question is: What is the .Net Framework
x.x penetration among your target audience - not the whole world.

Regards,

Joergen Bech
 
M

Michel Posseth [MCP]

Thanks for the links this was interesting reading materiall


In the Netherlands we have normally a fair use policy , i for instance have
a 20 mbit connection and have constantly 3 computers running
i am good for at least 100 GB a month of traffic and had never anny
complaints from my providers .

I had once understood that Germany ( wich had my main user target audience )
is pretty much the same as the Netherlands when it comes to internet prices
and infrasructure also note that the software i wrote was targeted to
Automotive workshops ( catalogue software )

regards

Michel


Joergen Bech @ post1.tele.dk> said:
I found a couple of very recent discussions:
http://discuss.joelonsoftware.com/default.asp?biz.5.608486.29
http://successfulsoftware.net/2008/...pment-stack-for-windows-desktop-applications/

It appears that the topic is alive and well.

The quoted stats are also quite different from the results obtained
from your more restricted sample.

Again: Target audience.

Regards,

Joergen Bech



Joergen ,,

I am currently developing production apps for a company inhouse , however
2
yars ago i wrote commercial apps with a user base of 20.000 throughout
europe we investigated at that time the penetration of the .Net framework
for our customers and found that 95% of the people who had a broadband
internet connection , also had the .Net framework installed and remember
this was + 2 years ago .

I do not know how it is in you country`s , but here in the Netherlands you
are a comple fool if you internet with a dialup connection as broadband
with telephony is here cheaper as a basic telephony abo inclusive calling
costs ( 20 MB broadband inclusive free national calls for 29,90 euro a
month )

Also the following ,, i am currently sitting behind my oldest computer a
AMD
XP 2400 + with 512 MB memory Windows XP Home and a harddisk of 40 GB this
computer is + 5 years old ! but is fully up to date with servicepacks and
optional components and runs verry smooth , i do not know how it is in
other
country`s but my friends and family are currently all running on new Vista
computers most of them dual core machines with min 2 gigs of memory and
250
+ GB of harddisk space , ( before i even installed it on my home
computer )

My point ,,, well i guess when you are developing progs for Zimbabwe or
such
country`s , you must be worried about how to get the software on the
computer
however here we download complete movies of 4,3 GB in 20 minutes or so so
optionally installing the framework is no problem .

When we were moving from DOS to VB6 we asked ourself ,,,, do we want to
support "those" ( few ) customers who are unwilling to invest in modern
computers ? now i do not see anny differnce with the .Net framework .
Especially since computers are now so cheap


just my thoughts

Michel



Joergen Bech @ post1.tele.dk> said:
On Thu, 22 May 2008 19:36:12 +0200, "Michel Posseth [MCP]"

On anny Windows computer connected to the internet it is pretty safe to
asume that the .Net framework is installed
You might even built a Installer that checks for the correct framework
and
if it is not installed download and install this from the MS website

It is easy for developers and IT pros to presume and
require that everything is updated, but unless you are
running a setup program that installs the framework
automatically if needed (with all that is required is for
the user to click next next next ...), it is *not* safe to
assume that Mr. and Mrs. Jones have updated their
home computer.

First of all, there are people who consistently answer "No" to
any plea from the Windows Security Center or to the
Windows Update notification in the SysTray (I know some of
them). Second of all, last time I checked, the .Net
Framework was an optional update (this might have
changed), which means that even if a machine is configured
to install updates automatically, the framework is not included
as it is not a critical update. I think the framework service
packs are critical, but I do not remember.

Then there are the situations where the (optional?) framework
update is selected, but fails to install (due to bloatware
preinstalled on notebooks nowadays?)

In a corporate environment with a sysadmin watching
the machine park like a hawk, no problem, but never
make any assumptions about the state of a home user's
machine or the same user's ability to do anything about
it. If Internet Explorer works, that is all that matters. And
who cares if the 60-day trial version of Norton Antivirus
that came preinstalled has not been updated for two years?
The machine is still running, so why change anything?

Ok, let me make a small correction: Even in the corporate
environment do we find sysadmins who refuse to install
the framework, thinking it is going to mess with the OS.
Then there are the server admins who do not allow version
2.0 to be installed on their servers because they need to run
software that depends on version 1.1 and still harbour doubts
that the two frameworks can coexist peacefully on the same
machine.

Then there are the old machines with low memory. Try installing
XP SP2 on a tablet pc running Windows XP Tablet Edition 2005
(or whatever it is called). Installing SP2 installs Framework 2.0 AND
burdens the OS with a few system tools, so suddenly just starting
the OS takes up an additional 50MB of memory compared to when
it was just running SP1. There goes another (albeit small) group of
machines where people might be hesitant to install the framework
(as part of the SP2 install).

Finally, there are still people on dial-up connections (or worse: who
pay for the amount of traffic) who might be happy to download a 1MB
application to try it out, but not if it means downloading an
additional 50MB framework (or much more for .Net 3.5) before they
can run it.

Did I forget the latest Eee PC or OLPC craze where they are starting
to shoehorn Windows XP into 4GB of flash memory? I do not know if
.Net 2.0 is included on those machines, but I do not think there is
much left over for the owners to be wasteful with it.

I do not know the stats for .Net (consumer) market penetration,
but I do not believe we are quite there yet.

Google:
http://discuss.joelonsoftware.com/default.asp?biz.5.592012.13

Ah! I remember in the good old 90'es when I released a freeware
VB6 program and people were complaining that the installer was
6MB too large due to the VB6 runtime files and that I ought to
switch to a real programming language like Delphi. After a few
years, the complaints went away and people thought nothing
of downloading a 10MB installer. Someday, .Net will get to that
point too.

Another question might be,, do you want your programs to run on
outdated
computers wich do not have the required servicpacks installed
thus users blaming your software while it are actually solved bugs ?

Even a machine that came with Windows XP preinstalled could
be considered outdated (7+ years old?) by today's standard, so
setting XP as the baseline is unlikely to cut out too large an
audience.

Regards,

Joergen Bech
 
J

Joergen Bech

I can give you an example of a piece of software that needs to be
able to run on very low-end, unpatched systems:
http://www.ikea.com/ms/en_GB/complete_kitchen_guide/planner_tool/download/index.html

(No, I did not write it, but I know who did).

One of the arguments put forth in one of the discussions I linked
to was that the *users* should pay the price of installing the .Net
framework so *I* can be more productive/agile by using .Net.

In the case of this program, however, there was one time when
a copy of it was distributed on CD with every catalogue sent
out by IKEA. I do not remember the figure, but I believe it was
in the double-digit millions.

Suppose it had been written in .Net: Even if the framework
was included on the CD, there would still be a percentage
of those millions of users who would have additional problems
installing it for whatever reasons outlined in my previous post.

Would it not be better if spending a little more time writing such a
program in a more low-level language rather than wasting
those peoples' time or even cutting out a small percentage
of those users?

Regards,

Joergen Bech
 
C

Cor Ligthert[MVP]

Joergen,

The only way to get information from IKEA here is to go to the shop and have
patience in the queues.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top