PS2EXE GUI Error

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

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 5 years and 1 month 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.
Locked
danklegislator
Posts: 2
Last visit: Fri Mar 29, 2019 7:14 pm

PS2EXE GUI Error

Post by danklegislator »

Hi All,

I've been experimenting with PS2EXE-GUI from: https://gallery.technet.microsoft.com/s ... t-e7cb69d5

Whenever I add this script into a form file (.psf) in PowerShell Studio, it does not run. It says there is an error around Line ~2550 before the #endregion in regards to "White space is not allowed before the string terminator."

When I export the .psf to .ps1 in PowerShell Studio, I can see the error on the line because PS Studio adds an extra whitespace, causing the error.

However, in the IDE, I do not see any extra space and cannot remove it.

Any ideas on how to fix?

Thank you.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: PS2EXE GUI Error

Post by jvierra »

If you add a PS1 as apart of a project it will be inserted correctly.
danklegislator
Posts: 2
Last visit: Fri Mar 29, 2019 7:14 pm

Re: PS2EXE GUI Error

Post by danklegislator »

jvierra wrote: Sun Feb 24, 2019 5:03 pm If you add a PS1 as apart of a project it will be inserted correctly.
Thank you!!
This topic is 5 years and 1 month 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.
Locked