Page 2 of 2

Re: NCPA plugins causing Python errors

Posted: Tue Apr 07, 2020 3:30 pm
by lmiltchev
We will be waiting on your findings about any possible restrictions for running PS scripts on your system that you might have.

Meanwhile, you can check if your scripts need to use 64-bit powershell in order to work. I can see that you are using the "default" ps1 directive:

Code: Select all

.ps1 = powershell -ExecutionPolicy Bypass -File $plugin_name $plugin_args
You could try using the 64-bit powershell (if needed):

Code: Select all

.ps1 = c:\windows\sysnative\windowspowershell\v1.0\powershell.exe -ExecutionPolicy Unrestricted -File $plugin_name $plugin_args
From the ncpa.cfg file:
# Since windows NCPA is 32-bit, if you need to use 64-bit powershell, try the following for
# the powershell plugin definition:
# .ps1 = c:\windows\sysnative\windowspowershell\v1.0\powershell.exe -ExecutionPolicy Unrestricted -File $plugin_name $plugin_args
Hope this helps.

Re: NCPA plugins causing Python errors

Posted: Wed Apr 08, 2020 9:51 am
by onegative
Okay Team,

So we were on the right track. The problem was associated with the Path to powershell.exe
Although it appeared correct when trying to access it gave a generic "not recognized" error
The path was re-created and low and behold the original .ps1 entry began working
I can only summarize that this is not a common failure and was not readily obvious as the path appeared correct but when accessing it fully qualified failed
So hopefully in the future if anyone else runs into a similar error they might take a look at not only the Sysnative virtual folder but the path the to powershell.exe as well.

Thanks for everyone's help and please lock this post,
Danny

Re: NCPA plugins causing Python errors

Posted: Wed Apr 08, 2020 9:58 am
by lmiltchev
Thank you so much for the feedback @onegative! I hope this will help other users, who may have similar issues. I am closing this topic.