문제

I have script of powershell that create ftp site this how I can run this script in on-startup using setup factory program

도움이 되었습니까?

해결책

on-startup(before setup begin)

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top