Discussion:
[wpkg-users] Issue running Powershell script on startup
Sam Colman, Primrose
2015-11-12 12:46:25 UTC
Permalink
Hello,

I am having trouble executing a Powershell script on startup. I am able
to run the command manually. However, it's just not working on boot.

Install command:

<install cmd='powershell -NoProfile -NonInteractive -ExecutionPolicy
bypass -File "\\path\to\file\script.ps1"'/>

Any help or suggestion are much appreciated.

Thanks.

Kind regards,

Sam
-------------------------------------------------------------------------
SSLrack - get your cheap cheap SSL certificates (standard, wildcard, EV)
http://www.sslrack.com/
-------------------------------------------------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Holger Kröber
2015-11-12 13:21:13 UTC
Permalink
Hi,

i have 2 suggestions:

* try it with comspec: <install cmd='%comspec% /C powershell
-NoProfile -NonInteractive -ExecutionPolicy bypass -File
"\\path\to\file\script.ps1">C:\Output.txt'/>
* for further troubleshooting, like Marco said before:

To run an interactive shell with SYSTEM account, use psexec:

psexec -d -s -i cmd

Regards,
Holger
Post by Sam Colman, Primrose
Hello,
I am having trouble executing a Powershell script on startup. I am
able to run the command manually. However, it's just not working on
boot.
<install cmd='powershell -NoProfile -NonInteractive -ExecutionPolicy
bypass -File "\\path\to\file\script.ps1"'/>
Any help or suggestion are much appreciated.
Thanks.
Kind regards,
Sam
-------------------------------------------------------------------------
SSLrack - get your cheap cheap SSL certificates (standard, wildcard, EV)
http://www.sslrack.com/
-------------------------------------------------------------------------
wpkg-users mailing list archives >>
http://lists.wpkg.org/pipermail/wpkg-users/
_______________________________________________
wpkg-users mailing list
https://lists.wpkg.org/mailman/listinfo/wpkg-users
Loading...