Skip to content

Instantly share code, notes, and snippets.

@egomesbrandao
Created July 13, 2012 13:12
Show Gist options
  • Select an option

  • Save egomesbrandao/3104819 to your computer and use it in GitHub Desktop.

Select an option

Save egomesbrandao/3104819 to your computer and use it in GitHub Desktop.
VBScript para executar um script Powershell sem abrir a janela console
Dim objShell
Set objShell = CreateObject("WScript.Shell")
strCMD = "powershell -sta -noProfile -NonInteractive -nologo -command " & Chr(34) & "C:\Script.ps1" & Chr(34)
objShell.Run strCMD,0
'Fonte: http://www.leporelo.eu/blog.aspx?id=run-scheduled-tasks-with-winform-gui-in-powershell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment