Hi, I am a bit new to this, so please excuse me if this question has an obvious answer. I have tried doing some research, but have not yet found an answer. I am hoping someone out there will be kind enough to point me in the right direction.

I apologise up front for the length of this post, but I am trying to provide all the relevant information in a single post rather than answer questions later. Hopefully if you understand where I am trying to get to, you will be able to help me.

Firstly, what I am trying to achieve. I am trying to repackage a small application (TightVNC) into an MSI so that I can deploy it by GPO (Active Directory Group Policy Object). I want to have 3 parent Features (VNC_Server, VNC_Viewer and Documentation) that are all available options to install, and I want to have a child Feature (VNC_Server_as_service) that is dependant on the Parent being installed. Therefore the layout in the Feature Choice part of the installation would be something like below:

VNC_Server
. \- VNC_Server_as_service
VNC_Viewer
Documentation

The parent Feature VNC_Server is just the WinVNC.exe file, a DLL (VNCHooks.dll), a few Start menu shortcuts, and some Registry entries. WinVNC.exe is both a standalone executable, and can also be installed as a service using the same file WinVNC.exe. When I was thinking of the planning for my MSI design, I thought that since the file WinVNC.exe is both a standalone executable and can be installed as a service, I would include the file in the parent Feature and make the child Feature VNC_Server_as_service dependant on the parent being installed. That way I am making sure that the file is available for use in the service.

That is where my plans came unstuck. When I came to do it (via a capture), I find that to install a service, you have to have the file included in the same Component, and have it as the Key for the component. However, I also want to include this same file in the parent Feature for the situation where VNC_Server is installed as a standalone executable and the service is not installed. To work around this I included the same file in 2 different components (WinVNC.exe and WinVNC.exe_service), installing the file in the same location (directory) for both. The trouble with this is that if you then uninstall the VNC_Server_as_service feature, it deletes the file WinVNC.exe. If you click on one of the Start menu shortcuts, the MSI repairs itself and reinstalls the file, but that is too messy and dodgy for my liking.

I though I had found the answer to my problem when I found mention of the MSI table RemoveFile in the Windows Installer doco (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/removefile_table.asp). As far as I can tell (please correct me if I am wrong), this table lists all files that are deleted by the RemoveFile action, and each of the rows is linked to a specific Component. I thought that I could find the row that relates to the file WinVNC.exe in the component WinVNC.exe_service, delete it, and my problem would be solved. This is when I encountered my next problem.

I am using Windows Installer Editor that comes as part of Wise Package Studio 5.6. It seems that as of version 4.5, the people at Wise have decided not to use the RemoveFile table. I think they are using the File table instead, assuming that you would always want to uninstall any files that you are installing with your MSI, rather than have the option of leaving some of them behind when you uninstall. I am reading between the lines from the sentances "Beginning with ... the Windows Installer Editor in Wise Package Studio 4.5, the Files page in Installation Expert provides a Remove File operation. Using this operation avoids the need to populate the RemoveFile table manually or to create a custom action." I found this at the Wise Knowledgebase article http://www.wise.com/KBArticle.aspx?articleno=1090&keywords=RemoveFile+table. When I have a look at the RemoveFile table in Wise Windows Installer Editor, it is compeletely blank. There is not a single row. Correct me if I am wrong, but I get very annoyed at people making assumptions like "you will always want to uninstall any files you have installed", and thereby losing potential funtionality that you would have if they used the RemoveFile table. I don't expect it would have been too hard for the people at Wise to design it to auto-populate the RemoveFile table with the same entries as the File table when you do a capture, instead of making the assumption "you will always want to uninstall any files you have installed".

Now that you have all the relevant history on what I have been doing (sorry it is so long), I am hoping that someone will be kind enough to give me some guidance. My main questions are:

1) Is there another way to install a service, other than include the same file (WinVNC.exe) in both Components?
2) If 1) is not possible, is there a way that I can get the uninstall action for the Feature VNC_Server_as_service to not delete the file WinVNC.exe. I think that this is a reasonable design, as the file WinVNC.exe will be uninstalled when you uninstall the Feature VNC_Server, so there will not be any orphaned files left behind on a full uninstall.

Any advice that anyone can provide will be most appreciated.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Hi Regen,

First of of would like to tell you that it is good thing to design the template architechure & then devlopeing the package, that is really good in your approch.
Now coming to your problem it is not good practice to keep executable & service in two different component as it is obvious that all the resource will get deploy on machine contained in same component, there is no need to create the architechure of sub-feature just to have service, whose executable is in parent feature, you will always land up with this situation.
Now solution i would like to suggest is keep 3 feature 1> Server, 2> Viewer and 3> Documentation, this will be ideal approach.
Now there is no need to keep the 2 copies of service executable file in 2 component as Server feature will be deploying 1 component with file & service in same component. Have to create one more component for Service control for staring & stoping definations for service.

Hope this will solve all ur problems.

Cheers,
Jimit
Answered 01/30/2006 by: jimehta
Senior Yellow Belt

Please log in to comment
0
Hi Jimit,
Thanks for your reply. I appreciate you taking the time to do so.

I have a good reason why I want to have the service as a child Feature. In the vendor installation package (non-MSI), there are 3 Features that match the ones I have chosen. At a later part of the installation wizard, you are given the option of additionally installing a service that will run the executable as a service that will start every time the PC starts. This is what I am trying to replicate with my MSI. I want to maintain the option of installing the VNC Server (WinVNC.exe) but be able to choose to not install it as a service.

In case you are not familiar with it, this program (VNC) is a remote control application where a support person (such as myself) can connect to a user's PC and share the control of the keyboard, mouse and screen. The executable WinVNC.exe can either be started manually by the user (i.e. as a standalone executable) or it can be installed as a service to start every time the PC starts.

Does anyone else have any advice on how I may be able to achieve this? Does anyone else have any expreience in creating a MSI for any other flavours of VNC? Most other flavours or variations of VNC work in a similar way, so maybe someone else has already encountered this problem and found a solution?

At the moment, I see 2 options available to me:

1) Leave the MSI as I have it. This means that the file WinVNC gets deleted when the Feature VNC_Server_as_service gets uninstalled, but gets put back as a MSI repair operation when someone tries to use it as a standalone at some later date. Messy but it mostly works.

OR

2) Have the standalone file installed in "Program Files\TightVNC" and a second copy of it somewhere like "Program Files\TightVNC\service". Again, this is messy, as it means that there are 2 copies of the file on the same drive.

I really don't like either option much, so if anyone else has a better idea, I would love to hear it.

Thanks.
Answered 01/31/2006 by: Regen
Senior Yellow Belt

Please log in to comment
0
Hey Regen -

Without going too deeply into your logic, a couple things come to mind.

A) you are quite right in that having 2 components install the same file to the same place is messy. And it is also a violation of Microsoft's componentization rules for windows installer projects. Break those rules at your own risk....

B) having two different components install the same file to two different places does not break the rules - but it makes maintenence (as in security updates - VNC has historically had some serious BO's requiring updates) more ugly and potentially problematic.

Can you not define both components as in (A) above, but have only one install? Set a public property and then use it in a component or feature condition so as to install one or the other but not both? Then if the user wants to subsequently change the mode, all they have to do is flip the switch and run the repair....

Regards,
William
Answered 01/31/2006 by: williamp
Orange Belt

Please log in to comment
Answer this question or Comment on this question for clarity