Having trouble getting VBS help so figured I'd ask here since I'm sure some of you have used/currently work with it.
I have need to write a VBS script that does the following:
1. Kills a cmd process with a specific title
2. Start a cmd SILENTLY with a specific title
I have bits and pieces of this code but unable to peice it together:
Kills with specific title:
Code: Select all
Option Explicit
Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run "CMD /C taskkill /f /fi ""WINDOWTITLE eq GJA_PROCESS"" & exit"
Starts with specific title:
Code: Select all
Set objShell = CreateObject("Wscript.Shell")
objShell.Run _
("%comspec% /C title GJA_PROCESS|C:\Users\user\Documents\zz.cmd"), _
1, TRUE
Need to start silently though....
Which is this:
Code: Select all
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\Users\user\Documents\zz.cmd" & Chr(34), 0
Set WshShell = Nothing
Thanks!