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:48 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:25:42 PM

David Hervieux
David Hervieux
Administrator
Posts: 4241
Hi,
You can create a command line session type and a script file. try to run it from the command line session.

--
David Hervieux
Devolutions inc.


0 permalink
7/21/2011 10:53:42 PM

Jewel Jubic
Jewel Jubic
Posts: 1
Are you with the solution because this thing does not work for me so well...

--
cheap business broadband
0 permalink
7/22/2011 3:12:17 AM

David Hervieux
David Hervieux
Administrator
Posts: 4241
Have you tried the shutdown add-on?

--
David Hervieux
Devolutions inc.


0 permalink
7/24/2011 6:45:06 AM

Greg Eisenmenger
Greg Eisenmenger
Posts: 2
David Hervieux wrote:
Have you tried the shutdown add-on?


--
viera lawyer
0 permalink
7/24/2011 6:45:15 AM

Greg Eisenmenger
Greg Eisenmenger
Posts: 2
not yet

--
viera lawyer
0 permalink




Powered by Jitbit Forum 7.0.4.0 © 2006-2011 Jitbit Software