Page 1 of 1

Sript won't run after compile - no error log

Posted: Thu Apr 18, 2019 11:36 am
by plautodfl
To help you better we need some information from you.

*** Please fill in the fields below if you are currently using a Trial Version of the Product. 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 2019 5.6.161.0
32 or 64 bit version of product: 64 Bit
Operating system:
32 or 64 bit OS: 64 Bit

*** Please add details and screenshots as needed below. ***
My script runs as expected from Powershell when RunAs Adminitrator
My script references UNC Path and works. I did see reference on the forum to modifying the config.xml file, but was not clear where to add the code.
I am unable to find where the executable errors. Is there a log file somewhere?
The result of a successful script from powershell_ise
The result of a successful script from powershell_ise
2019-04-18_14-32-13.png (66.27 KiB) Viewed 17697 times
DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM

Re: Sript won't run after compile - no error log

Posted: Thu Apr 18, 2019 12:01 pm
by brittneyr
Are you compiling your script into an executable?

Re: Sript won't run after compile - no error log

Posted: Thu Apr 18, 2019 1:44 pm
by plautodfl
I am compiling into an executable.
When I run the script in debugger mode, it works great.
When I run the exe, I get the directory name is invalid.
I have tested other scripts that access \\unc names so I am not sure this is the problem.
But it is worth a shot as \\machine\shares\....

Re: Sript won't run after compile - no error log

Posted: Thu Apr 18, 2019 1:47 pm
by plautodfl
Attaching the config file added .txt so it would upload

Re: Sript won't run after compile - no error log

Posted: Fri Apr 19, 2019 6:35 am
by davidc
When using Run As, make sure you run the executable from a location that is accessible to the Run As user.

In addition, if credentials are required for the network drive, the Run As user might not be able to access it, because it is not running as the current user.

Alternatively, you can use Impersonate User, which gives the executable access to current user's folders.

Re: Sript won't run after compile - no error log

Posted: Fri Apr 19, 2019 7:09 am
by davidc
There is also a known packager issue in the v161 that has been resolved in the v162 build.

Re: Sript won't run after compile - no error log

Posted: Mon Apr 22, 2019 8:56 am
by plautodfl
Going to try the *.162 download and also impersonate a user.
Thanks!
~P.