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
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
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.
This topic is 4 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
jgq1985
Posts: 23
Last visit: Thu Dec 07, 2023 7:30 am

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: 8488
Last visit: Tue Apr 16, 2024 8:42 am
Answers: 20
Been upvoted: 37 times

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 (https://docs.microsoft.com/en-us/window ... ler-portal)
would probably be a good idea.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 4 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.