' Launches one of the outlook-sync PowerShell scripts with no visible
' window. -WindowStyle Hidden on powershell.exe alone does not reliably
' suppress the console window when launched from Task Scheduler on this
' machine (it still flashed/showed a full window) - WScript.Shell.Run's
' own window-style argument does, since it bypasses whatever is making
' the console host show itself in that path.
'
' Usage: wscript.exe run-hidden.vbs "<full path to the .ps1 to run>"

Set objShell = CreateObject("WScript.Shell")
scriptPath = WScript.Arguments(0)
objShell.Run "powershell.exe -NoProfile -ExecutionPolicy Bypass -File """ & scriptPath & """", 0, False
