使用安装工厂运行命令行

时间:2014-05-10 07:41:38

标签: powershell installation

我有PowerShell脚本创建ftp网站this 我如何使用安装工厂程序

在启动时运行此脚本

1 个答案:

答案 0 :(得分:0)

启动时(安装开始之前)

的runScript(" NameOfYourPowerShell.ps1&#34);


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