Install .Net and PowerShell 7

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 1 month and 1 week 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.
leewalker
Posts: 1
Last visit: Tue Sep 24, 2024 3:52 am

Install .Net and PowerShell 7

Post by leewalker »

Product, version and build: PowerShell Studio 2024 v5.8.248
Operating system: Windows 11
PowerShell version(s): 7.4.5

*** Please add details and screenshots as needed below. ***

When running my compiled MSI on another machine (Sandbox), I'm being asked to install .Net and since PowerShell 7 isn't installed, I have to install that as well for my Windows Forms app to run.
I am unable to get these 2 additional requirements to install after the MSI install. I've set this up in 'Custom Actions' but obviously doing something wrong.

After running the EXE after installation -
SP1.png
SP1.png (58.46 KiB) Viewed 332 times
The Custom Actions settings (I've tried a number of different options here) -
SP2.png
SP2.png (70.49 KiB) Viewed 332 times
The Files and Folders settings. The bottom folder (redist) contains the .Net and PowerShell installers that successfully copy into the Install folder when running the MSI -
SP3.png
SP3.png (80.49 KiB) Viewed 332 times
Any and all help is appreciated!
User avatar
Alexander Riedel
Posts: 8575
Last visit: Fri Nov 01, 2024 6:19 am
Answers: 23
Been upvoted: 42 times

Re: Install .Net and PowerShell 7

Post by Alexander Riedel »

As you added a folder to the installer ('redist'), the files in that folder are also installed in a folder underneath your INSTALLDIR.
So in your custom action you need to refer to the file using that folder name. In your example that would be
redist\windowsdesktop-runtime-8.0.8-win-x64.exe
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 1 month and 1 week 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.