Powershell Studio 2019 64 bit Version 5.6.157
Windows 10 64bit 1803
Hello,
I have created a module folder within my Forms project from which a module can be loaded if required.
I don't know how to
a) programmatically access the folder when I am in Powershell Studio, and
b) later when I have compiled the project into an exe file.
If the program is started later, the execution location might be C:\, if I run it now, the execution location might be ..\Documents\Projects...
So how can I create a stable link to this module folder within my Project / *.exe?
Thank you for your help
EDIT: I was able to explain it to myself somehow,
within the project I can simply dot-sourcing to the folder.
When I create a *.exe file from the project, I have to make the folder available in the target by copying it there.
When creating a *.msi file, do you use the staging folder to provide data?
correct?
Create link to folder that is in the project
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.
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.
- GHIsolierung
- Posts: 62
- Last visit: Tue Nov 02, 2021 12:46 am
Re: Create link to folder that is in the project
Yes, dot sourcing will work. There is also a Get-ScriptDirectory helper function included in the Globals.ps1 file that returns the path of the script or executable.
The MSI can recreate the folder and files. If the folder's content is part of the project and the folder's project files' Build properties is set to Content, it will be automatically included in the MSI.
Alternatively, you can create a staging folder and manually manage the folder contents.
The MSI can recreate the folder and files. If the folder's content is part of the project and the folder's project files' Build properties is set to Content, it will be automatically included in the MSI.
Alternatively, you can create a staging folder and manually manage the folder contents.
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- GHIsolierung
- Posts: 62
- Last visit: Tue Nov 02, 2021 12:46 am