Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2982
  • Last Modified:

Install Service created in VB.NET - InstallUtil.exe

Hi - I have created a service in VB.NET (as described here:http://www.devarticles.com/c/a/VB.Net/Creating-A-Windows-Service-in-VB.NET/1/) and I am now planning the deployment. With regards to this I have a few questions and it would be very good if someone with experience in this area could please give me some advise.

1) I have developed the app in Visual Studio 9 (.NET 3.5) When I go to find the tool InstallUtil.exe I find this in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 however the tool is not present in C:\WINDOWS\Microsoft.NET\Framework\v3.5. Is there a new recommended way for deploying services in 3.5?

2) If I am to install the service on the client machines using InstallUtil.exe I guess I have to manually install .NET prior to installing the service. I guess this is a matter of downloading the framework from http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en and installing it? Anything else I need to consider? Will InstallUtil.exe be a part of this package or do I have to install .NET V2 first?

3) I do not have much experience installing apps on VISTA. Will the procedure be the same on this OS, I.e using InstallUtil.exe etc?

Thanks J
0
jes12345
Asked:
jes12345
  • 6
  • 5
1 Solution
 
rgn2121Commented:
I have never installed anything on Vista, so if I am way off here then just disregard.  I am curious why you don't just add a Setup and Deployment project to your solution and then create the Setup file to run on your Client(s).  You can add that the .Net versions be checked and installed as prereqs...
0
 
jes12345Author Commented:
Hi - its a good point. I guess I can first run a setup and deployment project to get all the files in place then do the manual steps using InstallUtil.exe to get the service set up.
Does this sound like a good strategy? I guess some of my questions still remain - why is this only in V2 not in V3.5 etc.-

Thanks J
0
 
rgn2121Commented:
I followed something similar to this for a service I installed on an XP system.  I was only installing it on one pc, so I knew the framework that was present, but You could slick on your setup and deployment projects and click properties and then prereqs and there you will see a list of things you can add as a prereq.

http://msdn.microsoft.com/en-us/library/ms227381.aspx
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
rgn2121Commented:
I would guess that it is only in .Net 2.0 and not 3.5 because it hasn't changed.  They probably figured, "Why add something to 3.5, that hasn't changed...they can use the tool in 2.0".

I am not sure what you mean by "Manual Steps', but I created the project and then ran the install...ALl setup and ready to go.
0
 
jes12345Author Commented:
Hi - thanks for the links. However this brings up a few new questions.
1) In the link you gave it says(http://msdn.microsoft.com/en-us/library/ms227342.aspx):

 Note - Always ensure that the target computer already has the .NET Framework installed.
I thought installing the .NET framwork was the purpose of the setup process you recommended?
2) It also says: Change the Solution Configuration to Release.
How do I do this?

Thanks J
0
 
rgn2121Commented:
1). It isn't necessarily the purpose, but it is what I am familiar with and I know you can select your prereqs and check to make sure certain things are installed before continuing.

2)You can do this by right clicking your project and going to Properties>Compile
Or you can left click your project to select it and at the top in the middle of the window you will see something like the screen below..either way click the drop down that says debug and click Release.


sample.png
0
 
jes12345Author Commented:
Hi - thanks again for the reply.

Final questions regarding the framework for clarification. If I install .NET 3.5 the V.2 will be installed as well right (i.e the InstallUtil.exe will be installed). Also if I create an installer and run it on a client machine and the .NET framework is missing then the setup will assist with downloading the framework right?

Finally I am still not clear on how to change the release setting. I do not have the same UI as you.. Please see the screenshots for the options I have.
ScreenHunter-01-Mar.-31-11.51.jpg
ScreenHunter-02-Mar.-31-11.51.jpg
0
 
rgn2121Commented:
Yours looks to be set for Release already...identified by the bin/release in your second screenshot.  If I was installing on a box that needed both then I would make sure that I checked both under the prereqs...  What I am on right now only has the .Net 2.0 listed, but I am sure my 2008 at home would be different.  If you want to wait till I can give screen shots of that then I can do it tomorrow.

As to your first question... I am not sure that if you specifiy 3.5 that it will add 2.0 becase that is a prereq for 3.5.  I would think, but I am away from my 2008 box, that you would select both .Net 2.0 and .Net 3.5.  That way it will check for both and install accordingly.  I can't really be much more specific since I can't look at it right now and tell you exactly what to do.
0
 
jes12345Author Commented:
Hi - again thanks for your reply. You are probably right in that I should set both 2.0 and 3.5 as a prereq and I will go for that strategy.

However I am still a bit confused with regards to Debug/Release. As you probably understand by now VB and .NET is fairly new to me since I have been a Java developer for many years. Therefore I am wondering what is really the difference between the two modes and is it possible to show a toolbar so that I can display the dropdown as you do? What version of visual studio are you on?

Thanks J
0
 
rgn2121Commented:
I use VS 2005 at work...VS 2008 at home, both Professional versions.  What version are you using?  On my 2008 box I can right click the toolbar at the top and select the standard toolbar.  I would think this is what is set as default, so I am curious if you are using an express edition?

I created a setup project today and looked at the default prereqs and 3.5 is selected.  You have the option to select 2.0 and 3.0, but without doing it I am not sure if you need to select all that apply.  If that is the case you will need to add launch conditions that is discussed in the following link.  Very simple to do...
http://msdn.microsoft.com/en-us/library/s1t32hs9.aspx
The notes section at the bottom talks about conditions for .Net Framework.

You can make it so the Framework is installed with your app and not downloaded from the web by adding the redistributables to your setup so if the user doesn't have internet access they can still update their framework.

As to Debug/Release...Debug builds contain extra info in the build for debugging etc.  Release builds do not and the code is optimized to be smaller and run faster.  This may cause what are known as release bugs.  Ones that only show during the release build.
 
0
 
jes12345Author Commented:
Hi -  I am using VS 2008 Pro but the toolbar is different(?) However I was able to find the setting under Build->Configuration Manager

Thanks for the links and all your advises. I blieve I have all the info I need now and will be creating the final installer over easter. So I will credit you the poinst now and I hope it is ok with you if I raise another question should I be stuck when I get back to creating the installation procedure.
Thanks-J  
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now