Packaged exe generates error when configured to impersonate user

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.
K_Kalicharan
Posts: 3
Last visit: Wed Jan 31, 2024 4:34 pm
Has voted: 1 time

Packaged exe generates error when configured to impersonate user

Post by K_Kalicharan »

Product, version and build: Powershell Studio 5.8.213
Operating system: Windows 11
PowerShell version(s):

I wrote a simple script that downloads an installation file to C:\temp then executes the file..

When I run the PSS compiled exe from any any of the user profile folders (downloads, desktop etc) I get an error "The directory name is invalid"..

If I move the PSS compiled exe to C:\ for example it works without error.

I am using Impersonate User NOT RunAs user
User avatar
Olga_B
Site Admin
Posts: 196
Last visit: Mon Mar 25, 2024 11:57 am

Re: Packaged exe generates error when configured to impersonate user

Post by Olga_B »

This is expected behavior

While packaging with Impersonate User, you should got warning:

Warning: Using alternate credentials usually prevents applications from running in personal folders (e.g. My Documents)
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.