I am having an issue where storing and using credentials in the "Packager, Credentials" is not working when I run it from the EXE.
I have set the Credentials in the 'Settings', 'Packager', Credentials' tab. When I run the project from within PowerShell Studio it works fine. But when I build and run the EXE it does not find the credentials... Does this only work within PowerShell Studio?
Sapien Credential Feature not working when packaged
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.
- kurtd_cobain
- Posts: 7
- Last visit: Wed Oct 18, 2023 10:03 am
Re: Sapien Credential Feature not working when packaged
[Moved to PowerShell Studio forum by moderator]
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Sapien Credential Feature not working when packaged
Can you please answer the following questions:
-What build of PowerShell Studio do you have installed?
-What Operating System are you working on?
-What version of PowerShell are you working with?
-What type of engine are you packaging with in SAPIEN Script Packager?
You may find the following helpful:
https://www.sapien.com/blog/2022/01/24/ ... your-code/
-What build of PowerShell Studio do you have installed?
-What Operating System are you working on?
-What version of PowerShell are you working with?
-What type of engine are you packaging with in SAPIEN Script Packager?
You may find the following helpful:
https://www.sapien.com/blog/2022/01/24/ ... your-code/
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- kurtd_cobain
- Posts: 7
- Last visit: Wed Oct 18, 2023 10:03 am
Re: Sapien Credential Feature not working when packaged
I had previously read that blog and that's how I found out about this new feature.brittneyr wrote: ↑Mon May 16, 2022 7:57 am Can you please answer the following questions:
-What build of PowerShell Studio do you have installed?
-What Operating System are you working on?
-What version of PowerShell are you working with?
-What type of engine are you packaging with in SAPIEN Script Packager?
You may find the following helpful:
https://www.sapien.com/blog/2022/01/24/ ... your-code/
PowerShell Studio Version = 2022 5.8.206
Windows 10 Pro 21H2
PSVersion 5.1.19041.1682
Script Engine = Windows PowerShell > SAPIEN PowerShell V5 Host (Windows Forms) > 64-Bit
Re: Sapien Credential Feature not working when packaged
I have not been able to replicate this behavior with the latest build of PowerShell Studio.
Please try clearing the output folder and try rebuilding. Verify that the executable was recreated.
Are you able to see your credentials if you output them in a messagebox in the script and then rebuild the executable?
Please try clearing the output folder and try rebuilding. Verify that the executable was recreated.
Are you able to see your credentials if you output them in a messagebox in the script and then rebuild the executable?
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- kurtd_cobain
- Posts: 7
- Last visit: Wed Oct 18, 2023 10:03 am
Re: Sapien Credential Feature not working when packaged
I just tried a PowerShell script and it is capable of showing the stored credentials with a packaged exe. However, I'm still unable to replicate that success with a script running in a form. It will only show the credentials when run interactively in PowerShell studio. And, I did clear the output folder and rebuilt it.brittneyr wrote: ↑Mon May 16, 2022 11:19 am I have not been able to replicate this behavior with the latest build of PowerShell Studio.
Please try clearing the output folder and try rebuilding. Verify that the executable was recreated.
Are you able to see your credentials if you output them in a messagebox in the script and then rebuild the executable?
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Sapien Credential Feature not working when packaged
Please post the code you use to retrieve the stored credentials and indicate where exactly in the form based code you do that.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- kurtd_cobain
- Posts: 7
- Last visit: Wed Oct 18, 2023 10:03 am
Re: Sapien Credential Feature not working when packaged
I'm just testing it so it's quite simple. I'm only trying to retrieve the password:Alexander Riedel wrote: ↑Mon May 16, 2022 1:11 pm Please post the code you use to retrieve the stored credentials and indicate where exactly in the form based code you do that.
$form1_Load={
$test = $SAPIENHost.GetPasswordString(0)
$textbox1.Text = $test
}
Re: Sapien Credential Feature not working when packaged
Are you building for executable from PowerShell Studio or SAPIEN Script Packager?
If the former, can you please open the Packager settings (Deploy->Packager) and try building from there?
If the former, can you please open the Packager settings (Deploy->Packager) and try building from there?
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- kurtd_cobain
- Posts: 7
- Last visit: Wed Oct 18, 2023 10:03 am
Re: Sapien Credential Feature not working when packaged
When I build it from Deploy > Installer section > Settings > Build Package it does work
When I build it from Deploy > Packager section > Settings > Build Package (or build) it doesn't work