views:

55

answers:

3

i found that its really pain to create setup and deployment packages for windows xp/vista/7 so my question is can i make my application portable with any third party tool such as thin app ?

my application requires dot net 3.5 framework and sql express 05 installed i want to put it on usb drive and user can execute it directly from usb drive without any setup and deployment, if there any other ways to achieve portability for software please let me know?

thanks !

+1  A: 

In order to check if .Net 3.5 and sql express is installed you can check if they are registred in the registry.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion - CurrentVersion

But you cannot check this with your 3.5 compiled assembly, so you need a non-dotnet application to do it, like a setup program.

Either you have to create a launcher in something like c++, or you could create a vb script launcher which checks the prerequisites before launching your .net app.

Mikael Svenson
all work in thinapp but thinapp is to costly
sansat
Costly as in price, or in execution time? And you want to package .Net 3.5 and SQL Express with the app as well?
Mikael Svenson
A: 

Neither SQL Express nor the .NET Framework will not run without being installed on the local hard disk.

Source for SQL Express: http://social.msdn.microsoft.com/Forums/en-US/sqlsetupandupgrade/thread/fc729d31-8a0b-4156-ab75-4fec652a438b.

Pieter
i tried thinapp and it working fine with sql express
sansat
Yes, but ThinApp is a virtual machine. It's not strange that works. If want it to execute without such a system and as a normal Windows application, that won't work.
Pieter
A: 

@Mikael already told the trick for .NET detection which you should take a look at.

I just want to add that for portable applications, you should use SQL Server Compact edition instead of Express,

http://blogs.msdn.com/b/sqlservercompact/archive/2010/07/07/introducing-sql-server-compact-4-0-the-next-gen-embedded-database-from-microsoft.aspx

Lex Li