Packaging Error

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
This topic is 12 years and 6 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.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Packaging Error

Post by Alexander Riedel »

No powershell code is executed in the first instance. Not even a PowerShell engine is instantiated. It just extracts the login credentials and bootstraps itself with them.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
stcemail
Posts: 36
Last visit: Thu Jun 18, 2015 7:28 am

Packaging Error

Post by stcemail »

I am about ready to give up and ask for a refund.

With version 1.1.14 I changed my password to remove the "special" characters and still got the same error messages. I guess the "space" is a sepcial character too. I can not change the password again.

I upgraded to the latest version and STILL CAN NOT GET IMPERSONATION TO WORK.

Impersonate User gets the error message "Powershell can not be instantiated".

Run as User gets a "The directory name is invalid" error. ?

I am very frustrated by the lack of a workable fix for what was advertised as a working feature when the product was purchased.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Packaging Error

Post by Alexander Riedel »

I completely understand that this is frustrating and if a refund is what you want you should contact sales@sapien.com.
Every single test we ran here with Impersonation and RunAs works properly using any character in passwords, including spaces. It so happens I have one in mine.

Please understand that we cannot diagnose any problem if we don't get all the information. For example, the "PowerShell cannot be instantiated" error, do you get that on your machine or on a target machine? What is the target machine's OS? Is PowerShell installed and accessible to the impersonated user?

It is also possible that your environment does not allow user impersonation dictated by group policy. But we cannot determine that here.

The only suggestion I can make is that you take this step by step:
- Create a package with YOUR credentials
- run it from a limited user on YOUR machine and display the current username.
- Do the same with a LOCAL user on a target machine
- Move to a domain user

Then we can see if there are security problems involved.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
stcemail
Posts: 36
Last visit: Thu Jun 18, 2015 7:28 am

Packaging Error

Post by stcemail »

I have done a lot of these tests, previously, with results posted here and a test file emailed to you.

Impersonation is not blocked by security policies or GPOs as they worked with version 1.14 with a test user account. That account did not have the required permissions it needed but did show that impersonation worked. However version 1.14 did not allow special characters in the passwords so we could not use the security account we desired.

Now with version 1.15 impersonation fails with all users accounts. It fails with both existing forms and new forms. It fails using the "impersonate" option and with the "run as" option each giving the different error I reported to you earlier.

I have only been trying it for the last week with the "username"@"domain" as that is what the instructions state but I am now going to run all my tests through again with the "domain""username" to see if that fares any better.

That is 3 different userids on both the impersonate and run as options with the 3 different manifest options.

I can't get it to display the current username. It does not launch. It simply doesn't work.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Packaging Error

Post by Alexander Riedel »

All I can do at this point is to hand this off to someone else here and have them run my battery of tests. Just to make sure I didn't do anything wrong testing.
I will have another team run these tests and get back to you.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Packaging Error

Post by Alexander Riedel »

Please try this on your machine:
use runas to launch
powershell.exe -file yourexportedscript.ps1

Use the credentials you usually specify.

If that works, package a file without credentials
and run with runas and see if that works.

Please let me know how that turns out
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
stcemail
Posts: 36
Last visit: Thu Jun 18, 2015 7:28 am

Packaging Error

Post by stcemail »

Both of those experiments worked fine.

A packaged script, with no credentials specified, will launch as the specified user with the runas command.

---------------------
Using the built in packaging credentials, "domainuser" did not fair any better than "user@domain".

Using a brand new form with one label showing the $ENV:USERNAME OR with an old form that works fine without credentials, here are the results :

If I use a good password and "Impersonate User" option I get a "Powershell cannot be instantiated" error message.

If I use a good password and "Run as User" option I get a "Directory name is invalid" error message.

If I use the wrong password, I get a password error message so it seems like it is trying.

Each test was done with both the new and old form.
They were all done with 3 different userids, one that has only letters and numbers with no special characters.
They were done with the 3 manifest options (I didn't bother with the custom manifest option).
These were all done in both STA and without STA mode enabled and they were done in both 32 and 64 bit tests.

I have quite the spreadsheet of test options to keep track of it all.stcemail2011-09-08 07:22:51
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Packaging Error

Post by Alexander Riedel »

Ok, now, when you use the run as user option and you get the "Directory name is invalid" message, open your task manager and check if you see one or two processes running.
RunAs launches itself with the specified credentials and I need to know if the message comes from the first or second instance.

Thanks.
Alexander Riedel2011-09-08 11:19:43
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Packaging Error

Post by davidc »

I ran some test on my end and I was unable to reproduce this error. Impersonate and RunAs worked without issue. David
davidc2011-09-08 11:53:45
David
SAPIEN Technologies, Inc.
User avatar
stcemail
Posts: 36
Last visit: Thu Jun 18, 2015 7:28 am

Packaging Error

Post by stcemail »

Ok, now, when you use the run as user option and you get the "Directory name is invalid" message, open your task manager and check if you see one or two processes running.
RunAs launches itself with the specified credentials and I need to know if the message comes from the first or second instance.

Thanks.


There is only one instance running for both errors.
This topic is 12 years and 6 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.