Additional commands not being run from 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 2 years and 3 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.
dbortunk
Posts: 7
Last visit: Mon Dec 18, 2023 12:23 pm

Additional commands not being run from MSI

Post by dbortunk »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: 1.4.43
Operating system: Windows 10
PowerShell version(s): 7

*** Please add details and screenshots as needed below. ***
I have created an MSI package which works except for three additional commands I have added. Those dont seem to be run at all. They are simple powershell delete file commands which if I run manually work so it appears the MSI is not running them
powershell -noprofile -command if (Test-Path "c:\software\DriveMapping.cmd") {Remove-Item "c:\software\DriveMapping.cmd"}
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Additional commands not being run from MSI

Post by Alexander Riedel »

How did you specify to run them? What are the settings?
Alexander Riedel
SAPIEN Technologies, Inc.
dbortunk
Posts: 7
Last visit: Mon Dec 18, 2023 12:23 pm

Re: Additional commands not being run from MSI

Post by dbortunk »

Not sure I understand the question. The command is specified is
powershell -noprofile -command if (Test-Path "c:\software\DriveMapping.cmd") {Remove-Item "c:\software\DriveMapping.cmd"}
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Additional commands not being run from MSI

Post by Alexander Riedel »

Assuming that with "Additional Commands" you mean "Custom Actions"
2021-12-16_12-01-35.png
2021-12-16_12-01-35.png (86.43 KiB) Viewed 3679 times
They are added here. What you specify here is what I am asking for.
A screenshot for one would suffice or you can attach the psbuild file.
Alexander Riedel
SAPIEN Technologies, Inc.
dbortunk
Posts: 7
Last visit: Mon Dec 18, 2023 12:23 pm

Re: Additional commands not being run from MSI

Post by dbortunk »

Image
2021-12-16 15_23_14-Clipboard.png
2021-12-16 15_23_14-Clipboard.png (92.52 KiB) Viewed 3679 times
No, I mean in Additional Deployment commands
User avatar
brittneyr
Site Admin
Posts: 1654
Last visit: Wed Mar 27, 2024 1:54 pm
Answers: 39
Been upvoted: 30 times

Re: Additional commands not being run from MSI

Post by brittneyr »

That is the deployment section, it doesn't affect your MSI. Since you are not deploying through SAPIEN Script Packager, these will never be called. If you want these to run when the MSI runs, you will need to create Custom Actions.

For more information on that, I recommend looking at the following article:
https://www.sapien.com/blog/2019/08/15/ ... xecutable/

Though the UI has changed, the information is still correct.
Brittney
SAPIEN Technologies, Inc.
dbortunk
Posts: 7
Last visit: Mon Dec 18, 2023 12:23 pm

Re: Additional commands not being run from MSI

Post by dbortunk »

Thanks. It appears custom actions only allow you to copy files but not run commands.
User avatar
brittneyr
Site Admin
Posts: 1654
Last visit: Wed Mar 27, 2024 1:54 pm
Answers: 39
Been upvoted: 30 times

Re: Additional commands not being run from MSI

Post by brittneyr »

You can put your commands in a script and run it as a Custom Action.
Brittney
SAPIEN Technologies, Inc.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Additional commands not being run from MSI

Post by Alexander Riedel »

https://www.sapien.com/blog/2018/02/26/ ... i-builder/

Here is a more verbose custom action description that might help.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 2 years and 3 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.