Kategorien
Digitalisierung

Quest KACE SMA K1000 How to run a Batch silent with Visual Basic script

Wie führe ich mit meiner Quest KACE Systems Management Appliance ein Visual Basic Skript auf meinen Clients aus, das eine Batch Datei silent ausführt, sodass die User die Ausführung nicht mitbekommen?

Durch Anklicken des Links werdet Ihr zu YouTube weitergeleitet.

Automatisches Transkript

Im Bereich „Skripte“ erstelle ich ein neues Skript. Ich gebe meine Daten in den Feldern Name, Status, Kategorie, Beschreibung etc. ein. Als Typ wähle ich „online Skript“, „offline Skript wäre auch möglich“.

Im Bereich „Installieren“ wähle ich aus, auf welchen Clients das Skript ausgeführt werden soll. Ebenso kann ich, wie immer, das Skript hinsichtlich Zeitplan etc. konfigurieren.

Das Entscheidende ist, dass wir als „Abhängigkeit“ unser Visual Basic Skript hochladen und das Batch Skript, das das VB Skript ausführen soll. Der Code des VB Skripts kann so aussehen:

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

Als nächsten definieren wir eine Aufgabe. Ob wir Überprüfungen oder ähnliches einstellen wollen, kommt auf den konkreten Zweck an. Hier erstellen wir als einfaches Beispiel einfach eine neue Aufgabe ohne Überprüfung. Und stellen bei „Erfolg“ unser Kommando ein, mit dem unser VB Skript ausgeführt werden soll. Wir wählen „Programm starten“ aus.

Als Verzeichnis wählen wir „c:\windows\system32“

Als Datei geben wir „wscript“ ein.

Bei den Parametern geben wir den Pfad zu dem VB Skript, gefolgt vom Pfad des Batch Skripts ein, die wir als Abhängigkeit hochgeladen haben: „$(KACE_DEPENDENCY_DIR)\meinvbskript.vbs“.

Jetzt können wir das Skript speichern.

Ich wünsche Euch viel Erfolg damit!

++++++++++++++++++++++++++++++++++++++++++++++++
In english

How do I use my Quest KACE Systems Management Appliance to run a Visual Basic script on my clients that silently executes a batch file so that the user does not notice the execution?

In the „Scripts“ area I create a new script. I enter my data in the fields Name, Status, Category, Description etc. I choose „online script“ as the type, „offline script would also be possible“.

In the „Install“ area, I select the clients on which the script should be executed. As always, I can configure the script in terms of schedule, etc.

The important thing is that we upload our Visual Basic script and the batch script that the VB script is supposed to execute as a „dependency“. The code of the VB script can look like this:

Next we define a task. Whether we want to stop checks or the like depends on the specific purpose. Here, as a simple example, we are simply creating a new task with no review. And if „successful“ we set our command with which our VB script should be executed. We select „start program“.

We select „c: \ windows \ system32“ as the directory

We enter „wscript“ as the file.

For the parameters we enter the path to the VB script, followed by the path of the batch script that we uploaded as a dependency: „$ (KACE_DEPENDENCY_DIR) \ myvbskript.vbs“.

Now we can save the script.

I wish you every success with it!
++++++++++++++++++++++++++++++++++++++++++++++++

Stay blogged. 😎

Dein Matthias Düsi