【问题标题】:Run command line using setup factory使用设置工厂运行命令行
【发布时间】:2014-05-10 07:41:37
【问题描述】:

我有创建 ftp 站点 this 的 powershell 脚本 如何使用设置工厂程序在启动时运行此脚本

【问题讨论】:

    标签: powershell installation


    【解决方案1】:

    启动时(设置开始前)

    runscript("NameOfYourPowerShell.ps1");


    function runscript(path)
    l1="C:\\WINDOWS\\system32\\windowspowershell\\v1.0\\powershell.exe C:\\"
    l2=path
        file = io.open("c:\\runscript.bat","w");
        file:write(l1..l2);
        file:close("c:\\runscript.bat");
        Shell.Execute("c:\\runscript.bat", "", "", "", SW_HIDE,true);
        File.Delete("c:\\runscript.bat");
    end
    

    【讨论】:

      猜你喜欢
      • 2013-12-27
      • 2021-09-12
      • 1970-01-01
      • 2017-01-03
      • 1970-01-01
      • 2020-07-12
      • 2012-01-27
      • 1970-01-01
      • 2015-05-25
      相关资源
      最近更新 更多