media-autobuild_suite
media-autobuild_suite copied to clipboard
Request: VBS Script to run batch window hidden
I wasn't sure where to put this but I made a custom VBS script that runs 'media-autobuild_suite.bat' in a hidden window as an administrator. This should be used to update the libraries and not when running the batch file for the first time.
Just place the .vbs file in the same folder as the batch script.
I hope someone finds this useful.
' Execute media-autobuild_suite.bat hidden
scriptdir = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
If WScript.Arguments.length = 0 Then
Set oShell1 = CreateObject("Shell.Application")
oShell1.ShellExecute "wscript.exe", Chr(34) & WScript.ScriptFullName & Chr(34) & " Run", , "RunAs", 0
Else
Set oShell2 = WScript.CreateObject("WScript.Shell")
oShell2.Run "CMD /D /C CALL """ + scriptdir + "\media-autobuild_suite.bat""", 0, True
End If
Set oShell1 = Nothing
Set oShell2 = Nothing