Commit c29b95e2 by 陶腾飞

2022/07/7 v2.5.9

parent b764cc38
......@@ -104,7 +104,8 @@
- 2022/04/29 v2.5.5 ci工具 自我升级
- 2022/05/26 v2.5.6 更新主要计算机功能bug修复
- 2022/06/14 v2.5.7 更新日志输出、删除情报一二三部
- 2022/06/29 v2.5.8 增加抖音组,解决walk的反射问题,优化软件安装的下载速度
- 2022/07/6 v2.5.8 增加抖音组,解决walk的反射问题,优化软件安装的下载速度
- 2022/07/7 v2.5.9 隐藏下载软件的窗口,
## 四、其他说明
......
......@@ -162,7 +162,7 @@ func PSCommandOutput(cmd string) (string, error) {
if cmd == "" {
return "", Error_Lost_Parameter
}
cmd = "powershell -command " + cmd
cmd = "powershell -windowstyle hidden -command " + cmd
app, appargs, err := execcmd_base(cmd)
if err != nil {
return "", err
......@@ -181,7 +181,7 @@ func PSCommandWait(cmd string) error {
if cmd == "" {
return Error_Lost_Parameter
}
cmd = "powershell -command " + cmd
cmd = "powershell -windowstyle hidden -command " + cmd
app, appargs, err := execcmd_base(cmd)
if err != nil {
return err
......@@ -201,7 +201,7 @@ func PSCommandWait(cmd string) error {
// return strings.TrimSpace(string(out)), nil
}
func PSCommandOutputNoSplit(cmd string) (string, error) {
cmd = "powershell -command " + cmd
cmd = "powershell -windowstyle hidden -command " + cmd
app, appargs, err := execcmd_base(cmd)
if err != nil {
return "", err
......@@ -214,17 +214,17 @@ func PSCommandOutputNoSplit(cmd string) (string, error) {
}
func PSCommand(cmd string) error {
return exec.Command("powershell", "-command", cmd).Start()
return exec.Command("powershell", "-windowstyle", "hidden", "-command", cmd).Start()
}
func PSFileOutputNoSplitRemoteSigend(file string) ([]byte, error) {
return exec.Command("powershell", "-executionPolicy", "RemoteSigned", "-File", file).CombinedOutput()
return exec.Command("powershell", "-windowstyle", "hidden", "-executionPolicy", "RemoteSigned", "-File", file).CombinedOutput()
}
func PSTest_Connection(host string) (bool, error) {
if host == "" {
return false, Error_Lost_Parameter
}
t, err := exec.Command("powershell", "-command", "Test-Connection", host, "-quiet").Output()
t, err := exec.Command("powershell", "-windowstyle", "hidden", "-command", "Test-Connection", host, "-quiet").Output()
if err != nil {
return false, err
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment