Error: Writing scripts failed, error code 87

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 9 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
calgarycoc
Posts: 11
Last visit: Thu Feb 01, 2024 10:45 am

Error: Writing scripts failed, error code 87

Post by calgarycoc »

PowerShell Studio 2017 v5.4.139
Windows 10 1803 64Bit

Clean install of PowerShell Studio version above.
upon opening any of my existing forms, or even creating a new form. Whenever I try to 'Build' it, to create the executable, I keep getting:
Error: Writing scripts to failed, error code 87

I tried saving to different locations, I tried with and without icons. I dont know what else to try.
Please help.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 20
Been upvoted: 37 times

Re: Error: Writing scripts failed, error code 87

Post by Alexander Riedel »

Error code 87 means 'invalid parameter'. If it literally says 'Error: Writing scripts to failed, error code 87' without a file name, then there is no output name specified.
Probably would be best to send us a project or form you try to build with it's .psbuild file.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
calgarycoc
Posts: 11
Last visit: Thu Feb 01, 2024 10:45 am

Re: Error: Writing scripts failed, error code 87

Post by calgarycoc »

yes there was a file path, i just didnt think you wanted that. I created a new form, saved it to my c:\temp folder. here are the results.

>> Package 'C:\Temp\dunno.psf'
>> Building (dunno.psf) ...
SAPIEN Package and Deploy Tool 4.1 (c) 2005 - 2017 SAPIEN Technologies, Inc.

------ Build started: dunno, Configuration: x64 ------
Packaging with SAPIEN PowerShell V5 Host (Windows Forms) x64
Adding C:\Temp\dunno.Package.ps1
Error: Writing scripts to bin\x64\dunno.exe failed, error code 87, data size: 5240

>> Completed
User avatar
Olga_B
Site Admin
Posts: 196
Last visit: Fri Mar 29, 2024 8:53 am

Re: Error: Writing scripts failed, error code 87

Post by Olga_B »

Hello.
I can't reproduce the error on our end.
I was using your file, and was able to build executable without problem.
Have you try to build executable using different ScriptEngines like V3 Host (Windows Form) or V5 Host Windows? Any errors?
Try to reinstall application, and reboot machine after.
User avatar
calgarycoc
Posts: 11
Last visit: Thu Feb 01, 2024 10:45 am

Re: Error: Writing scripts failed, error code 87

Post by calgarycoc »

man I feel so stupid ... I know Im gonna be razzed for this, but if it helps someone else... As I said at the beginning, this was a clean install of powershell studio, and even tho after installing, powershell studio did not tell me to reboot. A reboot seems to have resolved the issue for me. omg lol
let the back lash begin ... :-(
User avatar
Olga_B
Site Admin
Posts: 196
Last visit: Fri Mar 29, 2024 8:53 am

Re: Error: Writing scripts failed, error code 87

Post by Olga_B »

Glad to hear that it's working for you :)
This topic is 5 years and 9 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.