Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 12-03-2009
Member
 
Join Date: Dec 2008
Posts: 50
idea 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.
Reply With Quote
  #2  
Old 12-03-2009
Member
 
Join Date: Apr 2008
Posts: 1,948
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
Reply With Quote
  #3  
Old 12-03-2009
Member
 
Join Date: May 2008
Posts: 2,008
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.
Reply With Quote
  #4  
Old 12-03-2009
Member
 
Join Date: Feb 2008
Posts: 1,848
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".
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How do i run vbs script in XP"
Thread Thread Starter Forum Replies Last Post
Dumping logon name and logon script values to a text file - blank logon script field Phil McNeill Windows Server Help 3 17-08-2010 09:06 PM
Is it possible to execute Perl script within another script? RasMus Software Development 2 21-07-2009 10:57 PM
Word 2008 + bibfuse: no script in script menu deval4u Software Development 5 06-04-2009 12:53 PM
Problem with script in order to open another script in an extra window Samsher Software Development 2 14-01-2009 01:25 PM
Startup Script or Login Script ?? WANNABE Active Directory 5 22-12-2006 07:44 PM


All times are GMT +5.5. The time now is 02:04 AM.