Package Error, Type to type and IPAddress

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 5 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
clum09
Posts: 150
Last visit: Sun Jan 21, 2024 5:07 pm

Package Error, Type to type and IPAddress

Post by clum09 »

Product, version and build: 7.4.121
32 or 64 bit version of product: 64-bit
Operating system: Windows 10
32 or 64 bit OS: 64-bit

PrimalScript 2019 with release 7.4.121 periodically generates the error below during packaging the script. I did not package the script as an MSI package - I just package it to an executable file only, but it generates the error.
SAPIEN Package and Deploy Tool 4.1 (c) 2005 - 2019 SAPIEN Technologies, Inc.

Error: No MSI name specified. Please check your settings.
PrimalScript 2019 changes the word Type to type immediately after the cursor moves away from character e on the editor when I work on the script. It also recognizes IPAddress as a keyword. This behavior does not occur on PowerShell Studio. I have already opened a topic about the casing and IPAddress issue before, but this has not been fixed. See the screen shots below.

PrimalScript screen shot:
PRSKeywords.JPG
PRSKeywords.JPG (17.91 KiB) Viewed 3455 times
PowerShell Studio screen shot:
PSKeywords.JPG
PSKeywords.JPG (17.09 KiB) Viewed 3455 times

Please correct these two issues in PrimalScript.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Package Error, Type to type and IPAddress

Post by Alexander Riedel »

Please send or upload the .psbuild file for the file that exhibits the MSI error when packaging an exe.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Package Error, Type to type and IPAddress

Post by Alexander Riedel »

The MSI builder is only invoked when PSBuild has an /MSI parameter, which can only happen if you select to build the MSI file.
As these items are all enabled just simply if a settings file exists, it might be possible to hit them accidentally. Therefore the next service build will enable/disable options more selectively as to avoid accidental use of features for which no settings exist.

The Type and IPAddress problem has already been logged as indicated in your previous report on that matter here: viewtopic.php?f=11&t=13477&p=71172#p71172

Please avoid replicating reports, as it might just delay handling an issue when it seems there is more information for it.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Package Error, Type to type and IPAddress

Post by Alexander Riedel »

Please see https://docs.microsoft.com/en-us/powers ... wershell-6

The keyword type is in the list of reserved words and is therefore correctly case corrected to the indicated case used in the documentation.
From the documentation: "There are certain words that have special meaning in PowerShell. When these words appear without quotation marks, PowerShell attempts to apply their special meaning rather than treating them as character strings. To use these words as parameter arguments in a command or script without invoking their special meaning, enclose the reserved words in quotation marks."

If the word is used as 'Type' or "Type" no case correction occurs in the current build of PrimalScript.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
clum09
Posts: 150
Last visit: Sun Jan 21, 2024 5:07 pm

Re: Package Error, Type to type and IPAddress

Post by clum09 »

Alexander,

You said that type "is in the list of reversed words and is therefore correctly case corrected to the indicated case used in the documentation."

However, the reserved words SHOULD NOT start with a lower case - it should starts with an upper case unless it a Unix based type script. In PowerShell Studio, type remained as Type and not type like PrimalScript (see my screen shots in my original post). PrimalScripts seems to think that I am writing a Unix script and not a PowerShell script. Therefore, PrimalScript corrected Type to type instead of leaving it to remain as I typed it. In fact, if PrimalScript thinks that Type is a reserved key word, it should have changed it to have the first character (t) being upper case (T) instead of lower case (t) like what it is doing right now.

Imagine if PrimalsScript tries to correct the PowerShell cmdlet like from Get-Content to get-Content that starts with a lower case character if it thinks that it is a reserved key word! That is an incorrect behavior that a script editor should do. Therefore, please correct this behavior for the up coming release.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Package Error, Type to type and IPAddress

Post by Alexander Riedel »

The Powershell documentation has 'type' exactly as spelled here, all lowercase. If you think that is incorrect, please contact Microsoft, we did not write the documentation.
You said "the reserved words SHOULD NOT start with a lower case". If that is your opinion, why do you not post that in a Microsoft PowerShell forum?
I refer you once again back to the link (https://docs.microsoft.com/en-us/powers ... wershell-6) where ALL reserved keywords are specified ALL lowercase. Maybe the distinction between cmdlets and reserved words is escaping you here.
Just because PowerShell Studio does not case correct something, it does not change the specification. You can post over in the PowerShell Studio section if you think they should follow the specs.
We wouldn't correct Get-Content to get-Content because the docs say it is 'Get-Content'. Kind of a DUH!, isn't it?
If something is demonstrated to be a bug, we will certainly correct it, but we cannot correct anything that follows Microsoft's specifications and documentation just on your say-so or because you have a different opinion. I am hoping you can understand that.
If you do not like case correction, there is always the option of turning it of. Since PowerShell is not case sensitive anyway, you are not bound to make any syntactical error due to that.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 5 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.