Discussion:
[wpkg-users] powershell: system cannot find the file
Andreas Schamanek
2016-10-20 14:17:02 UTC
Permalink
Hi fellow Wpkg'ers,

For JRE, I switched to using powershell to remove old versions as
suggested in https://wpkg.org/Java

However, it seems that on some PCs `powershell` cannot be found:

2016-10-20 11:43:21, ERROR : Command 'powershell -noprofile
-EncodedCommand DQAKAGYAbwByAGUA(...) B1AHQADQAKAH0A'
was unsuccessful.|The system cannot find the file specified.|

And I think I had the same problem with some of my batch files.
Apparently, powershell is installed in
%SystemRoot%\System32\WindowsPowerShell\v1.0 but this is not in the
PATH.

Am I right? What's the recommended way to extend the PATH variable
within a package XML?
--
-- Andreas

:-)

---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Dafydd Jones (techneg.it)
2016-10-20 14:49:46 UTC
Permalink
Post by Andreas Schamanek
Hi fellow Wpkg'ers,
For JRE, I switched to using powershell to remove old versions as
suggested in https://wpkg.org/Java
2016-10-20 11:43:21, ERROR : Command 'powershell -noprofile
-EncodedCommand DQAKAGYAbwByAGUA(...) B1AHQADQAKAH0A'
was unsuccessful.|The system cannot find the file specified.|
And I think I had the same problem with some of my batch files.
Apparently, powershell is installed in
%SystemRoot%\System32\WindowsPowerShell\v1.0 but this is not in the
PATH.
Am I right? What's the recommended way to extend the PATH variable
within a package XML?
--
-- Andreas
I use PowerShell extensively in my pkgs and have never come across this
problem, but rather than extending the PATH why don't you just specify the
full path to the powershell command?

Dafydd
Andreas Schamanek
2016-10-21 19:35:03 UTC
Permalink
Post by Dafydd Jones (techneg.it)
I use PowerShell extensively in my pkgs and have never come across
this problem, but rather than extending the PATH why don't you just
specify the full path to the powershell command?
I thought that was too much a risk to break it on some of the other
clients. Is it always in %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
on Windows 7?

Anyway, I had a chance to look at some of the affected clients and it
became immediately clear that all but the failing ones had
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\ within %PATH%, so I am
just going to add this to the PATH where it is missing.
--
-- Andreas

:-)

---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Loading...