貌似默认是禁止运行 powershell 脚本,cmd 也不行
感谢
貌似默认是禁止运行 powershell 脚本,cmd 也不行
感谢
|
wnpllrzodiacOct 11, 2020 via Android
1
startup 啊。自古有之
|
|
2
@wnpllrzodiac powershell 不行啊
|
|
imn1Oct 11, 2020
3
给客户还是自己用?
给客户不能自动部署,要解禁运行权限,自己用的话应该已经解禁了,放入计划任务就行 |
|
MakeItGreatOct 11, 2020 via Android
4
运行一个 cmd
让 Cmd 调用 powershell |
|
5
@MakeItGreat 嗯嗯,要这么玩
PowerShell -Command "Set-ExecutionPolicy Unrestricted" PowerShell C:\jsjcjsjc\ip.ps1 |
|
6
很简单呀
用 vbs 运行 ps1, -ExecutionPolicy Bypass 就行了 dim shell set shell = WScript.createobject("wscript.shell") shell.run "PowerShell -ExecutionPolicy Bypass -File C:\start-app.ps1",0 |
|
7
winsw.exe 包个服务啊,开机自动运行,我的 frpc 就是这样搞的,完美运行一年多了
|
|
8
请使用 Windows 自带的 taskschd.msc
|
|
10
nssm,可以用它
|
|
SgtPepperOct 11, 2020
12
用 windows 自带的计划任务应该可以吧 这玩意儿支持 ps 啊
|
|
Dragonish3600Oct 11, 2020 via iPhone
13
计划任务啊,这是最标准的做法的……
|
|
yuyu2140Oct 12, 2020
16
@DAPTX4869
```xml <service> <id>frpc</id> <name>frp_0.33.0_windows_amd64</name> <description>frpc 客户端自启服务,实现内网穿透</description> <executable>frpc.exe</executable> <arguments>-c frpc.ini</arguments> <startmode>Automatic</startmode> <onfailure action="restart" delay="60 sec"/> <logmode>append</logmode> <logpath>logs</logpath> </service> ``` |