Distributing .Net applications onto machines w/o .Net



  • Is it possible to run .Net applications without the .Net framework? This doesn't seem as crazy as it initially seems. After all, .Net applications are run through a JIT just before being run so it should be possible to ship it pre-compiled with all the required .Net components included..

     The target application is intended only to run in a Windows environment (it uses Office PIA's) so portability wont pose a problem.
     

    I have come across this which seems to promise mainly what is described above http://thinstall.com/  but are there any other ways/ utilities?



  • Well you can do that, and there are a few other utils around that claim to do the same thing, but I'd have to ask why. Are these pre-Win XP machines with net access over dial-up, or do yu need to distribute on a floppy? I can't think of another situation where I'd consider it.

    .NET takes little time to download on a decent connection, and if they already have it installed, it takes zero time. Linking everything you need from the framework into your EXE makes it bigger and takes away a lot of the advantages of using .NET.



  • It's what the boss desires.. detailed explanation will come later



  • @JCDenton said:

    detailed explanation will come later

    ... on the front page 



  • I agree with the others, this seems to be a WTF waiting to happen.

    All of the supposed advantages of thinstall's .Net virtualization are bullshit if you are even remotely competent.  First, they claim that having multiple versions of the Framework cause problems - Since when?  I have 1.1, 2.0 and 3.0 on my machine and have had no problems whatsoever.  I've never had version conflicts on any of the PCs with multiple verions.  Running multiple versions was one of the major design criteria for .Net.  Second is their claim that locked down PCs can't be immediately upgraded.  Again bullshit especially in a AD controlled corporate environment.  You can easily push MSI's with group policies that run the installs at elevated rights.  You can even publish standard exe setups via ZAP files as well.  Not to mention what you can do with SMS.  Third they claim that you can't disassembly the exe.  Again this is bullshit - If it is in memory, you can reverse engineer it.  It may be more difficult but it can be done. 

    Whatever the reason for looking at this type of solution, there has to be a better way.

     



  • Now that I have time I'll share some of the details. I wrote a tool for internal use in the office in .Net 2.0 without realizing this is installed on very few machines so for people to use this tool they have to sit through the .Net installer which takes at least 10min. 1 Person sitting through this is fine but when it's more and especially management (this tool is for use by management) this will turn expensive. Sure the application will bloat but the alternative is running the .Net installer for a single application...



  • @JCDenton said:

    Sure the application will bloat but the alternative is running the .Net installer for a single application...

    Surely the alternative is making it work with .NET version $current? It can't be that hard, right?

    On the other hand, I know several native compilers for java, so I'm sure similar tools exist for .net. Maybe DotGNU can do it, seeing how GCJ compiles java into native code as well. 



  • My advice, download the redistributable and store it on the network.  Then install .Net 2.0 silently using the following command.

    dotnetfx.exe /q /c:"install.exe /q"

    To initiate the install, you have a variety of options such as logon script, run key in registry, or startup folder link.  If the end users don't have admin rights on their local box, wrap the installer with another tool like AutoIt or encrypted runas (I don't remember the exact tool) and run the above command under the context that does.  You can even write a quick vb script that performs the install and deletes the initiating mechanism (reg key, startup link).  We recently pushed out the DST patches the same way.

    Once the clients have the framework, the application install will be painless.


     



  • @Nandurius said:

    Maybe DotGNU can do it, seeing how GCJ compiles java into native code as well. 

    I doubt that. portable.net has just finished it's JIT compiler. 



  • If you org is big enough (10+ PCs and a win server?) for centralised management to make sense, hopefully your admins (or you if you're him) are using something like WSUS, SMS, or non-MS 3rd party tools (which you REALLY should be using anyway), mass installation of .NET is a non-issue. Unless your admins are dumb, you're centrally managing windows updates, and you can just put it out with the patches.

    Alternatively, the above mentioned options such as logon scripts are all far better than twisting the framework into doing something that it wasn't meant to.

    Once the initial 'pain' (it's easy really) of framework installation is over, you're living merrily in the world of XCOPY/ClickOnce without bloated bastardised EXEs.



  • The organization is huge and the department rather big, the tool doesn't warrant any such elaborate steps and I do not have the authority to set up such update schemes. (In addition just about everyone is using laptops so I'm not sure how management of people's laptops / workstations is conducted)

    Thanks for the info anyhow.

     For now I'll stick with keeping the .Net installer with the program. Ill check whether people are running 1.1 and port the program over if it's worth the investment.

    It is of course my duty to acknowledge the existence of such tools to the upper echelon.... ;)



  • We have a .net 2.0 app that more and more people are using. I went to one user's computer and showed him the URL for the ClickOnce deployment. It actually deployed the framework for him too.

     http://msdn2.microsoft.com/en-us/netframework/aa497348.aspx

    The other benefit is that users get new versions when they launch the app from their desktop



  • @JCDenton said:

    Now that I have time I'll share some of the details. I wrote a tool for internal use in the office in .Net 2.0 without realizing this is installed on very few machines so for people to use this tool they have to sit through the .Net installer which takes at least 10min. 1 Person sitting through this is fine but when it's more and especially management (this tool is for use by management) this will turn expensive. Sure the application will bloat but the alternative is running the .Net installer for a single application...

    If it's a huge organization, then the bathroom is likely far enough away from each person's desk that s/he can go take a whiz while the framework installs.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.