Install to / uninstall from a network share - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

mk100
Posts: 5
Joined: Wed Mar 17, 2010 11:35 pm

Install to / uninstall from a network share

Hello,

I need some guidance on how to handle uninstalls when the application has been installed to a network share.

When installing software on the client machine, the Folder Dialog is used to browse to a shared drive on the network where the application files are actually installed. Shortcuts pointing to the files on the network share, registry, and Application Data files are of course installed on the local PC.

The idea is that all end-user PCs will be running the application from the same set of files on the network share.

The problem is if the application is uninstalled from a PC, then it would delete all the files from the network share, which would be a problem for everyone else that still uses the application... Is there some way to exclude or prevent the application files from being removed when the software is uninstalled? The idea is that the uninstall would remove everything else that it typically does - shortcuts, registry, Application Data - but not the files it originally copied to the app's folder.

Any pointers would be much appreciated.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Install to / uninstall from a network share

Hi,

I am afraid this behavior is not supported by Windows Installer.

A better approach is to have two installers:
- one for the server, that installs all the needed files for server-side use.
- another install for the clients, that only installs the local configurations needed on the client machine (registries, configuration files, etc) without installing the main app.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
mk100
Posts: 5
Joined: Wed Mar 17, 2010 11:35 pm

Re: Install to / uninstall from a network share

Hello Gabriel,

After my post I ran across something that might provide a way for this to work. Each component listed under the various Features I have has a set of properties, one being an Attribute called "Permanent". According to the Help file, this would achieve the goal of preventing the file from being deleted when the application is uninstalled. Do I have that right?

So the question that follows is - can I set that property programatically through a script, and if so how?

I really need to find a way to get this to work in one install. Our app currently has just one install that can handle local as well as network installs without the "side-effects", so having to go to two separate installs would be a step backwards (not to mention it would generate a lot of complaints from clients).

Any other ideas would be appreciated.

Thank you!
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Install to / uninstall from a network share

Hello,

Well, you could try separating your server part from your client part through the user of features, one for the server side, one for the client side.
You can then easily uninstall the feature without uninstalling the server side.

I am not aware of any method of programatically setting the Permanent flag. Nor do I suggest this path, as it leaves garbage data on the server (the server-side data can not be uninstalled anymore).

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
mk100
Posts: 5
Joined: Wed Mar 17, 2010 11:35 pm

Re: Install to / uninstall from a network share

Okay, if the "Permanent" attribute of a component cannot be set by a script, is it possible to use a script to set the component property "Do not register this component with Windows Installer"?
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Install to / uninstall from a network share

Hello,

What you can do, as mentioned in my previous post, is to organize your product in two features: the server side part and the client side part.
When run on the client, you would disable the installation of the server-side part by default or even make the feature hidden and not to be installed, unless some credentials are provided or something like that.

The following article demonstrates how mark a feature not to be installed using vbscript:
http://www.advancedinstaller.com/user-g ... ature.html
You can adapt this article to suit your needs.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”