How do i run vbs script in XP
Hello Folks,
I'm running Windows Xp as my operating system. I would like to know that how do i run vbs script on it. I had tried it in the command prompt, but was continuously getting the following error 'currentpagefilesettings.vbs' is not recognized as an internal or external command. So do any one have any idea about vbs script and how do i run it on Windows Xp? Any kind of help would be appreciated.
Thanks in advance.
Re: How do i run vbs script in XP
Follow the below steps.
' From the book "Windows XP Cookbook"
' ISBN: 0596007256
' ------ SCRIPT CONFIGURATION ------
strComputer = "<HostName>"
strCommand = "cscript.exe c:\scripts\dircheck.vbs"
' ------ END CONFIGURATION ---------
set objController = WScript.CreateObject("WSHController")
set objRemoteScript = objController.CreateScript(strCommand, strComputer)
WScript.ConnectObject objRemoteScript, "remote_"
objRemoteScript.Execute
do While objRemoteScript.Status <> 2
WScript.Sleep 100
loop
WScript.DisconnectObject objRemoteScript
Re: How do i run vbs script in XP
Is the VBScript the only thing in the policy that is not executing? I ask this because the problem may be with the GPO and not necessarily executing the VBScript on XP. Try adding something else to the policy other than a VBScript and see if it gets executed. If not, research why your policy isn't being implemented.
Re: How do i run vbs script in XP
Windows Script Host is the successor of batch files and enables scripts to be executed directly on the Windows desktop or command console, without the need to embed those scripts in an HTML document. Scripts can be run directly from the desktop by clicking on a script file, or from the command console. WSH provides a low-memory scripting host that is ideal for non-interactive scripting needs, such as logon scripting, administrative scripting, and so on.
Windows Script Host comes free with Windows 2000/XP and 98/ME. If you have Windows 95 or NT, WSH can be downloaded for free from Microsoft as part of a package called "Windows Script 5.1".