How to properly build the project

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 1 year and 3 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.
matthewmazer
Posts: 7
Last visit: Wed Jul 05, 2023 1:01 pm

How to properly build the project

Post by matthewmazer »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: Powershell Studio, can't find the version/build number but it was downloaded less than a week ago
Operating system: Windows 10
PowerShell version(s): 5.1.19041.2364

*** Please add details and screenshots as needed below. ***

I have my project (multiple windows forms) built and created an executable. When I try to run the executable, I get an error that says "The Directory Name Is Invalid." A second error I get is "requires elevation" but running as an admin will not work either.

DO NOT POST LICENSES, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 3:14 pm
Answers: 39
Been upvoted: 30 times

Re: How to properly build the project

Post by brittneyr »

Does your project run as just a script (CTRL + F5)?

What happens when you do run as an admin? Are you still getting the "The Directory Name Is Invalid" error?
Brittney
SAPIEN Technologies, Inc.
matthewmazer
Posts: 7
Last visit: Wed Jul 05, 2023 1:01 pm

Re: How to properly build the project

Post by matthewmazer »

Yes, it does run as a script. Using the hotkey combo you mentioned or "play" button.


I don't know how to strike through, please disregard the below text (old reply)
I'm trying to build this as an executable. I haven't tried it as a script yet
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 3:14 pm
Answers: 39
Been upvoted: 30 times

Re: How to properly build the project

Post by brittneyr »

Have you configured your executable to runas or impersonate?

This error generally occurs when using alternate credentials and the app is running from a personal folder (e.g. My Documents).

There should have been a warning in Output while your script was being packaged into an executable.
Brittney
SAPIEN Technologies, Inc.
matthewmazer
Posts: 7
Last visit: Wed Jul 05, 2023 1:01 pm

Re: How to properly build the project

Post by matthewmazer »

I tried each option, with the same issues (I tried searching through the forums for an answer before posting).

HOWEVER, this time I took out all of the stored credentials as well, and it seemed to work okay...but this introduces a new problem.

There are some actions that will require admin credentials. How can I make this work? I initially tried installing to a public\users\documents folder (hoping this would clear the whole "using alt credentials" issue) but I had no such luck.
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 3:14 pm
Answers: 39
Been upvoted: 30 times

Re: How to properly build the project

Post by brittneyr »

You cannot run an executable using alternate credentials from a personal folder.

Generally, when installing software, you install in Program Files.

You may find the following forum topic helpful:
viewtopic.php?p=83746&hilit=The+Directo ... lid#p83746
Brittney
SAPIEN Technologies, Inc.
This topic is 1 year and 3 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.