Can anyone explain to me why vbscript does not run on Windows server 2008.
cheers
-
-
Try "cscript <yourfile>.vbs"... Or is that you can't get something work?
-
Where are you running VBScript - as a scheduled task, in IE, etc.?
-
I am trying to deploy a vbscript on a remote machine running on windows 2008. and i get permission denied, even if i am using administrator account which is the same administrator password in the remote machine.Matthew van Eerde said:Where are you running VBScript - as a scheduled task, in IE, etc.?
does anyone has an idea, or workaround on this? -
How are you deploying it?neopay said:
I am trying to deploy a vbscript on a remote machine running on windows 2008. and i get permission denied, even if i am using administrator account which is the same administrator password in the remote machine.Matthew van Eerde said:*snip*
does anyone has an idea, or workaround on this?
-
Matthew van Eerde said:
How are you deploying it?neopay said:*snip*by using this script;
Dim objController, objRemoteScript, objFSO
Dim objTSIn, objTSOut, strComputer
'Create objects
Set objController = CreateObject("WshController")
Set objFSO = CreateObject("Scripting.FileSystemObject")'Deploy script to remote computer
strComputer = "remotemachine"
WScript.Echo strComputer & ": Deploying at " & Now
Set objRemoteScript = objController.CreateScript( _
"C:\test.vbs", strComputer)
WScript.ConnectObject objRemoteScript, "remote_"
objRemoteScript.ExecuteDo Until objRemoteScript.Status = 2 ' 1 is running, 2 is done.
WScript.Echo "."
WScript.Sleep 1000
Loop
objTSOut.WriteLine strComputer & ": Completed at " & Now
Set objRemoteScript = Nothing
-
Which line is failing?neopay said:Matthew van Eerde said:*snip*by using this script;
Dim objController, objRemoteScript, objFSO
Dim objTSIn, objTSOut, strComputer
'Create objects
Set objController = CreateObject("WshController")
Set objFSO = CreateObject("Scripting.FileSystemObject")'Deploy script to remote computer
strComputer = "remotemachine"
WScript.Echo strComputer & ": Deploying at " & Now
Set objRemoteScript = objController.CreateScript( _
"C:\test.vbs", strComputer)
WScript.ConnectObject objRemoteScript, "remote_"
objRemoteScript.ExecuteDo Until objRemoteScript.Status = 2 ' 1 is running, 2 is done.
WScript.Echo "."
WScript.Sleep 1000
Loop
objTSOut.WriteLine strComputer & ": Completed at " & Now
Set objRemoteScript = Nothing
If you'd like to take this to a more responsive medium you can email me at (mateer at microsoft dot com) or IM me at (mvaneerde at hotmail dot com)
-
Matthew, could you please post the solution? I'm having the same problem between two computers on the same domain, regardless of the OS (XP or Win Server). I'm getting "Permission denied" on .CreateScript, although I'm a local admin on both machines and have no problems running a vbscript directly on the "remote" box. I tried to use WMI with "Win32_Process" to run the script, but that failed too with error 8. I can start Notepad on the remote box using either method without any problems.Matthew van Eerde said:
Which line is failing?neopay said:*snip*
If you'd like to take this to a more responsive medium you can email me at (mateer at microsoft dot com) or IM me at (mvaneerde at hotmail dot com) -
A first troubleshooting step is to download DCOMTest and get it working.LeoW said:
Matthew, could you please post the solution? I'm having the same problem between two computers on the same domain, regardless of the OS (XP or Win Server). I'm getting "Permission denied" on .CreateScript, although I'm a local admin on both machines and have no problems running a vbscript directly on the "remote" box. I tried to use WMI with "Win32_Process" to run the script, but that failed too with error 8. I can start Notepad on the remote box using either method without any problems.Matthew van Eerde said:*snip*
If DCOMTest isn't working, VBScript remote execution won't work.
If DCOMTest is working, but VBScript still is failing the .CreateScript call, make sure to set the "allow remote administration exception" group policy under gpedit.msc | computer configuration\administrative templates\network\network connections\standard profile\windows firewall, and set the appropriate IP range (or * if you're just trying to get things to work... remember to lock it down afterwards)
Once .CreateScript is working, you can use the objRemoteScript.Error object to troubleshoot issues during the actual running of the script.
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.