I want to apply vbs script via kaseya,
Can somebody help me how I can create the procedures in kaseya as I am not much familiar with it.
Please find the stepwise snapshot of my procedure below
1
2
3
this script does nothing but just open a dialog box with a message like below but its not successful. Please help if I am missing anything.
Well, there are number of things you can do. In the last step, try executing #agentdir#test.vbs instead c:\test.vbs.
But since you are just getting started, perhaps I can offer some helpful suggestions:
First, try using the procedure log to capture what is going on during the script. I make extensive use of it in my scripts. For example, the very first step in most of my scripts is a "Write Procedure Log Entry". In in the box labeled "Enter the comment for the procedure log entry" I put something like this:
Starting script: Test
After your first step where you create he variable, I would insert another "Write Procedure Log Entry" step that logs the value of the #agentdir# variable. In the comment box, put:
agentdir variable = #agentdir#
Your "Write File" statement is fine, but I would drop the "Always True" statement. It is not necessary.
I've never used the "Execute Vbscript" command. I think it got added to Kaseya recently. Try using the "Execute Shell Command - Get Results to Variable" instead with this as the command:
c: & cd #agentdir# & cscript /nologo test.vbs
Then add a step after it to write the resulting variable to the procedure log too. Use this as the comment:
results = #global:cmdresults#
Finally, write a procedure log entry to indicate that the script execution made it to the final step. Create one final "Write Procedure Log Entry" with this as the comment:
Script finished!