Product: PowerShell Studio 2022 (64 Bit)
Build: v5.8.209
OS: Windows Server 2016 Standard (64 Bit)
Build: v10.0.14393.0
I'm having an issue where a Service created by PowerShell studio crashes when I try to start the service. This same script used to work on past versions of PowerShell Studio but since upgrading to 5.2 and now 5.8 the created service won't start. I am compiling the exact same script with the same settings and I get error 1064 "An exception occurred in the service when handling the control request". I switch back to an executable created in previous versions of Sapien PSS and the service starts without an issue.
When I change the service to use the local system account the service starts fine, but when I change it to start with my service account it gives this error. Again, switching back to the old executable and starting with the service account it all works as expected.
I created a net-new service script to just echo to a file and that gives me the same results. Is there something that changed in recent versions of Sapien that makes it so service accounts can't be used easily?
Service Crashing on Start
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.
Service Crashing on Start
- Attachments
-
- SapienBit9_3.png (7.88 KiB) Viewed 1115 times
-
- SapienBit9_2.png (8.04 KiB) Viewed 1115 times
-
- SapienBit9_1.png (4.7 KiB) Viewed 1115 times
Re: Service Crashing on Start
Since you updated from an older build, do you have the service defined functions that are included with the service template in PowerShell Studio? These functions need to be present and cannot be renamed.
An explanation of the functions can be found here:
https://www.sapien.com/blog/2022/06/14/ ... e-project/
An explanation of the functions can be found here:
https://www.sapien.com/blog/2022/06/14/ ... e-project/
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Service Crashing on Start
Thanks @brittneyr
For anyone who gets this in the future ... I got it working by NOT installing the service with an MSI. I copied the complied executable to the directory it should be in and did an 'ExecutableName.exe /i' to install it, modified the "Logon As" manually using Services.msc, and everything works fine now. Service starts no issues.
Not sure why it wouldn't work using the MSI but these are the settings I was using.
For anyone who gets this in the future ... I got it working by NOT installing the service with an MSI. I copied the complied executable to the directory it should be in and did an 'ExecutableName.exe /i' to install it, modified the "Logon As" manually using Services.msc, and everything works fine now. Service starts no issues.
Not sure why it wouldn't work using the MSI but these are the settings I was using.
- Attachments
-
- SapienBit9_5.png (13.56 KiB) Viewed 1098 times
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Service Crashing on Start
Thanks for the update. I have alerted QA to investigate.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Service Crashing on Start
To verify from your screenshots. You installed a 64 bit service in the 32 bit Program Files folder? Can you please attach the .psbuild file for further evaluation?
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.