Package file - 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.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
abrahamlowell
Posts: 24
Joined: Sun Mar 03, 2013 12:43 pm

Package file - The directory name is invalid

Post by abrahamlowell » Thu Mar 13, 2014 1:27 pm

- Wrote a simple code to stop a windows service on a remote computer when pressing on button "Stop Service".
- In the Script Packager dialog, in the Security tab, Execution = Run as specified user. Alternate credentials is specified in the format: username@domain.net
- After the build is complete, when executing the .exe, it throws an error: "The directory name is invalid".

Any idea? Please help.

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

Re: Package file - The directory name is invalid

Post by davidc » Thu Mar 13, 2014 4:20 pm

We will investigate. Is this a local user or domain user only?

David
David
SAPIEN Technologies, Inc.

User avatar
abrahamlowell
Posts: 24
Joined: Sun Mar 03, 2013 12:43 pm

Re: Package file - The directory name is invalid

Post by abrahamlowell » Thu Mar 13, 2014 4:34 pm

- Alternate credential is a domain user and is also a local administrator on the target computer.
- The user account that I am using to create & package the script is not a domain administrator.

User avatar
abrahamlowell
Posts: 24
Joined: Sun Mar 03, 2013 12:43 pm

Re: Package file - The directory name is invalid

Post by abrahamlowell » Thu Mar 13, 2014 5:25 pm

ok, I have some more data for you.

- If a Domain User packages the script to .exe, upon execution, it throws error: "The directory name is invalid"

- If a Domain Admin packages the script to .exe, upon execution, it does not throw any error and the executable runs.

User avatar
abrahamlowell
Posts: 24
Joined: Sun Mar 03, 2013 12:43 pm

Re: Package file - The directory name is invalid

Post by abrahamlowell » Fri Mar 14, 2014 12:57 pm

- ok, so the above only worked in my lab environment.
- it does not work in my production environment.
any idea why this is happening?

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

Re: Package file - The directory name is invalid

Post by davidc » Fri Mar 14, 2014 1:24 pm

When querying the application's path,.NET tries to create a directory (why? we don't know) and if the account doesn't exist on the local machine, it fails and produces the error message.

We will be releasing a service build soon that should hopefully resolve this issue.

David
David
SAPIEN Technologies, Inc.

User avatar
abrahamlowell
Posts: 24
Joined: Sun Mar 03, 2013 12:43 pm

Re: Package file - The directory name is invalid

Post by abrahamlowell » Fri Mar 14, 2014 1:56 pm

Thanks David. Very much appreciated. Looking forward to a fix for this issue.
Please note that the error is produced even if the "run as specified" account is added to the local machine.

User avatar
abrahamlowell
Posts: 24
Joined: Sun Mar 03, 2013 12:43 pm

Re: Package file - The directory name is invalid

Post by abrahamlowell » Sun Mar 23, 2014 3:21 pm

David - do you have any updates on this?

User avatar
Alexander Riedel
Posts: 6949
Joined: Tue May 29, 2007 4:43 pm

Re: Package file - The directory name is invalid

Post by Alexander Riedel » Sun Mar 23, 2014 5:44 pm

Please understand that it's a weekend.
David will be back Monday.
Alexander Riedel
SAPIEN Technologies, Inc.

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

Re: Package file - The directory name is invalid

Post by davidc » Mon Mar 24, 2014 8:21 am

Please try the last service build. You will have to repackage your script to test.

David
David
SAPIEN Technologies, Inc.