Follow us on LinkedIn Find us on YouTube
home recent topics recent posts search faq  

Devolutions inc. > Forum

user:
psw:
| register | lost password   open id
Messages in this topic - RSS

Home » Remote Desktop Manager - Session Script Tools » How to run .vbs script

Use this forum to share with the community the template or session tool you have created.
3/21/2011 6:59:45 AM

illiac4
illiac4
Posts: 4
Hi!
I'd like to run shutdown script .vbs which will shut down all the computers listed in .txt file. So basically in a folder is script run.vbs an computerlist.txt. The content of the script is:

-------------------------------------------------------------------------------
Dim objShell, strShutdown

Set Fso = CreateObject("Scripting.FileSystemObject")
Set InputFile = fso.OpenTextFile("Computerlist.txt")

Do While Not (InputFile.atEndOfStream)
Computername = InputFile.ReadLine
set objShell = CreateObject("WScript.Shell")
Ping = objShell.Run("ping -n 1 " & Computername, 0, True)
Select Case Ping
Case 0
' MsgBox "On Line " & " , " & Computername & " , " & Ping
strShutdown = "shutdown -s -t 0 -f -m \\" & Computername
objShell.Run strShutdown
Case 1
' MsgBox "Off Line " & " , " & Computername & " , " & Ping
End Select
Loop

' MsgBox "All done, click to exit"

Wscript.Quit
------------------------------------------------------------------------------

How can i run this script through RemoteDesktopManager? Basically i just want to tun it.
0 permalink
3/22/2011 8:27:10 PM

David Hervieux
David Hervieux
Administrator
Posts: 4241
You can create a command line session script tool, but there is no direct textbox to put the script. This is something we want to do eventually. So you will need to create the vbs and call it with command line session tool.

--
David Hervieux
Devolutions inc.


0 permalink
3/23/2011 3:57:10 AM

illiac4
illiac4
Posts: 4
dhervieux wrote:
You can create a command line session script tool, but there is no direct textbox to put the script. This is something we want to do eventually. So you will need to create the vbs and call it with command line session tool.


Well it does not work. I have tried to run the script with ''cscript.exe run.vbs computerlist.txt'' it does not work. I have put that line into run.cmd. If i run it throught remotedesktopmanager it does not work, if i run it directly from explorer then it does.
0 permalink
3/23/2011 4:11:43 AM

David Hervieux
David Hervieux
Administrator
Posts: 4241
Can you give me more information, do you get an error ? Have you tried to set the full path?

--
David Hervieux
Devolutions inc.


0 permalink
4/21/2011 9:38:18 PM

cochran crony
cochran crony
Posts: 1
Are you still with the error or the problem is solved...

--
vpn client
0 permalink
4/22/2011 3:11:55 AM

David Hervieux
David Hervieux
Administrator
Posts: 4241
Hi,
The error was resolved in the version 6.0.1.0

--
David Hervieux
Devolutions inc.


0 permalink
7/6/2011 8:11:17 AM

David Hervieux
David Hervieux
Administrator
Posts: 4241
What do you mean, do you get an error?

--
David Hervieux
Devolutions inc.


0 permalink




Powered by Jitbit Forum 7.0.4.0 © 2006-2011 Jitbit Software