Link to home
Start Free TrialLog in
Avatar of jes12345
jes12345

asked on

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
Avatar of rgn2121
rgn2121
Flag of United States of America image

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...
Avatar of jes12345
jes12345

ASKER

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
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
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.
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
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
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
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.
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
ASKER CERTIFIED SOLUTION
Avatar of rgn2121
rgn2121
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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