0

I am looking to run a single script file to automate a KACE agent check in. My problem is I need the script to run silently so that the users are unaware it is being ran in the back ground. I have been told to use a vbs script to run the .bat silent, but why can't I run everything from the vbs script in the first place?? Here is my .bat script that currently does what I need it to aside from being silent.

@ECHO OFF
cd "C:\Program Files\Dell\Kace\" 
runkbot.exe 6 0

Thanks!

Limon Monte
  • 44,025
  • 43
  • 163
  • 189

3 Answers3

0

If you have an Administrative account on your network or if you have a Domain and you are a Domain administrator you can use PSExec to invoke the script remotely.

Turrican
  • 607
  • 4
  • 9
  • I won't have the credentials when I need the script to run. The plan is to run the script on a vpn connection, so the connection software will be running the script. – Zarfelt Bellatorious Mar 12 '15 at 20:28
  • Connection software can run .vbs scripts? – Turrican Mar 12 '15 at 20:33
  • Ok, you can launch a executable or batch file from vbs calling Shell Com-Object http://stackoverflow.com/questions/298562/windows-xp-or-vista-how-can-i-run-a-batch-file-in-the-background-no-windows-di – Turrican Mar 12 '15 at 21:59
0

Set oShell = WScript.CreateObject ("WScript.Shell") oShell.run "cmd /K CD C:\Program Files\Dell\Kace & runkbot.exe 6 0", 0, TRUE

0

Create a .vbs file with a name like silent.vbs with the code:

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run """" & WScript.Arguments(0) & """" & sargs, 0, False

Then call it from a batch-file using wscript.exe silent.vbs yourfile.bat <parameters for your batch-file>

Or you could compile it as an exe file with a compiler like this one: http://www.f2ko.de/programs.php?lang=en&pid=ob2e

Script_Coded
  • 592
  • 6
  • 19