Run as not working - Error the directory name is invalid

Support for all customers who have purchased a SAPIEN PowerShell Studio product license. This forum does not offer a response time guarantee.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE 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.
User avatar
buttonbass
Posts: 1
Joined: Sat Aug 06, 2016 7:43 pm

Run as not working - Error the directory name is invalid

Post by buttonbass » Mon Nov 13, 2017 8:48 am

32 or 64 bit version of product: 64
Operating system: Windows 10
32 or 64 bit OS: 64

I would like to utilize alternate credentials option in the output settings. However they don't work unless the user that I am attempting to run as or impersonate has a home folder on the computer I am running the application from. It appears another user has posted this problem in the past here viewtopic.php?t=7380

I am running powershell studio 2017 5.4.143

User avatar
davidc
Posts: 4948
Joined: Thu Aug 18, 2011 4:56 am

Re: Run as not working - Error the directory name is invalid

Post by davidc » Tue Nov 14, 2017 12:39 pm

Impersonate and RunAs behave differently.

Impersonate user runs the application under the current user with privileges of the specified user.

RunAs runs the application as specified user, which means all environments folders will point to the RunAs user's path. So if you start the application is a user specific folder (such as My Documents), Windows will throw a directory not found error, because it will not be able to located the application using as the RunAs user.
David
SAPIEN Technologies, Inc.