BetaONE will rise again!


Reply
  #1  
Old 9th Oct 05, 08:17 AM
*MO*'s Avatar
*MO* *MO* is offline
Senior Member
 
Join Date: Aug 2002
Location: Cape Town
Posts: 311
*MO* is an unknown quantity at this point
Send a message via MSN to *MO*
Destributing C# Applications
Hi. I recently learnt C# and have a few questions.
I create my applications in Visual Studio .NET, and its a great tool. I manage to create the setup file. So I'm able to run the setup on my machine, to get the program running.

However, if i want to use that same application on a friends PC, which does not have the .NET framework installed, i can't use the application.

Now apparently there is a way to have the .NET framework installed when you run the setup application. Does anybody know how i can do this?

eg : I take my application to a friends PC. His PC does not have the .NET framework installed. When he clicks SETUP, the application will first install the needed .NET framework files, and then install my application, so that he can use it.



Any help would be gladly appreciated.

Thank you

./Mo
Reply With Quote
  #2  
Old 11th Oct 05, 07:33 AM
war59312 war59312 is offline
BetaONE Supporter
 
Join Date: Jul 2001
Location: U.S.A
Posts: 2,220
war59312 has disabled reputation
Send a message via ICQ to war59312 Send a message via AIM to war59312 Send a message via MSN to war59312 Send a message via Yahoo to war59312
I believe this is what you need.

http://www.microsoft.com/downloads/d...DisplayLang=en
__________________
Ad Muncher Usage Statistics for v4.7 Build 27105/1624
Adverts removed by Ad Muncher: 1,601,933
Approximate bandwidth saved: 12,515 MB
Counter started: April 2, 2003

Download: http://war59312.admuncher.com/download.shtml
Reply With Quote
  #3  
Old 12th Oct 05, 09:24 AM
*MO*'s Avatar
*MO* *MO* is offline
Senior Member
 
Join Date: Aug 2002
Location: Cape Town
Posts: 311
*MO* is an unknown quantity at this point
Send a message via MSN to *MO*
Awesome. thanx very much. now how do i use it? he he he he.

Oh by the way. I only started using C# last week. i've been a java developer all along.

I'm using Visual Studio 2003.

So any help would be great

thanx
Reply With Quote
  #4  
Old 12th Oct 05, 12:21 PM
~*McoreD*~'s Avatar
~*McoreD*~ ~*McoreD*~ is offline
Super Moderator
 
Join Date: Jul 2002
Location: Australia
Posts: 2,902
~*McoreD*~ is an unknown quantity at this point
Embedding Microsoft .NET Framework to the Application Setup won't be a good idea unless you are distributing it via a CD.

I'd suggest you to try a simple Installer like Inno. In Inno setup script you can have the following code:

[code]
Code:
function InitializeSetup(): Boolean; var ErrorCode: Integer; NetFrameWorkInstalled : Boolean; Result1 : Boolean; begin NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\.NETFramework\policy\v2.0'); if NetFrameWorkInstalled =true then begin Result := true; end; if NetFrameWorkInstalled = false then begin NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\.NETFramework\policy\v1.1'); if NetFrameWorkInstalled =true then begin Result := true; end; if NetFrameWorkInstalled =false then begin Result1 := MsgBox('This setup requires the Microsoft .NET Framework 1.1. Please download and install the .NET Framework and run this setup again.', mbConfirmation, MB_OK) = idYes; if Result1 =false then begin Result:=false; end else begin Result:=false; end; end; end; end;
The installer will detect if there is .NET Framework is installed and the user will be taken to the page where she can download the latest .NET Framework version.

Congratulations on your move to C# from Java.

Cheers,
McoreD
Reply With Quote
  #5  
Old 12th Oct 05, 12:37 PM
~*McoreD*~'s Avatar
~*McoreD*~ ~*McoreD*~ is offline
Super Moderator
 
Join Date: Jul 2002
Location: Australia
Posts: 2,902
~*McoreD*~ is an unknown quantity at this point
Visual Studio .NET Bootstrapper
Also check this out.

http://msdn.microsoft.com/vstudio/do.../bootstrapper/

Setup projects in Visual Studio .NET 2003 can be used to install the .NET Framework with your application, but only if you have installed the optional Visual Studio .NET Framework Bootstrapper Plug-in on your development computer. The Visual Studio .NET Framework Bootstrapper Plug-in modifies the behavior of the Setup project's Bootstrapper property to include the .NET Framework bootstrapper. The .NET Framework redistributable is then packaged with your application; when the user runs the bootstrapper setup.exe, it checks for the correct version of the .NET Framework at install time and if necessary, installs it before installing your application.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Speed up system. greasemonkey Hardware Support 6 6th Nov 01 07:32 PM


All times are GMT +1. The time now is 09:33 PM.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.