Script to be able to add or remove files through MSI?

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
Posts: 19
Joined: Sun Mar 03, 2013 12:44 pm

Script to be able to add or remove files through MSI?

Post by jgq1985 »

Product, version and build: 5.7.171
32 or 64 bit version of product: 64
Operating system: Windows 10
32 or 64 bit OS: 1903

Hello, I was wondering if someone could guide me on this...
I'm looking to write a script that will copy files to a directory.
For example, copy folders and files from \\server\share\folder to c:\programdata\here.
That part I can figure out...

But if I want to package it into an MSI, will it do that upon install? Or do I just make a blank script and make an MSI that copies files to a specified directory?
And say I wanted the MSI uninstall to remove the files it copied by calling a remote uninstall on the system, would the MSI do that inherently? Or would that require scripts?

User avatar
Alexander Riedel
Posts: 7458
Joined: Tue May 29, 2007 4:43 pm

Re: Script to be able to add or remove files through MSI?

Post by Alexander Riedel »

I am not quite sure what you try to accomplish and how. An MSI is generally used to install files on a machine (among other things) and to remove them on uninstall.
In general, that requires no extra script, since the files in question are contained in the MSI.
I am not sure why you'd need an extra script or why an MSI would need a 'remote' uninstall?
Nothing gets executed automatically on install by default. You'd need to define a custom action to do that and yes, you can use PowerShell scripts for that.

An initial read of the Windows Installer documentation ( ... ler-portal)
would probably be a good idea.
Alexander Riedel
SAPIEN Technologies, Inc.